Artifact cf2affaf91d3ee0ca4db15c2916dc7701db50c7a06e21ecc8e5fa72529307c7d:
- File
psl-1983/3-1/kernel/string-gensym.red
— part of check-in
[eb17ceb7f6]
at
2020-04-21 19:40:01
on branch master
— Add Reduce 3.0 to the historical section of the archive, and some more
files relating to version sof PSL from the early 1980s. Thanks are due to
Paul McJones and Nelson Beebe for these, as well as to all the original
authors.git-svn-id: https://svn.code.sf.net/p/reduce-algebra/code/historical@5328 2bfe0521-f11c-4a00-b80e-6202646ff360 (user: arthurcnorman@users.sourceforge.net, size: 1077) [annotate] [blame] [check-ins using] [more...]
- File
psl-1983/kernel/string-gensym.red
— part of check-in
[eb17ceb7f6]
at
2020-04-21 19:40:01
on branch master
— Add Reduce 3.0 to the historical section of the archive, and some more
files relating to version sof PSL from the early 1980s. Thanks are due to
Paul McJones and Nelson Beebe for these, as well as to all the original
authors.git-svn-id: https://svn.code.sf.net/p/reduce-algebra/code/historical@5328 2bfe0521-f11c-4a00-b80e-6202646ff360 (user: arthurcnorman@users.sourceforge.net, size: 1077) [annotate] [blame] [check-ins using]
% % STRING-GENSYM.RED - Complement to GenSym, makes a string instead of ID % % Author: Eric Benson % Symbolic Computation Group % Computer Science Dept. % University of Utah % Date: 14 January 1982 % Copyright (c) 1982 University of Utah % % Edit by Cris Perdue, 9 Feb 1983 1620-PST % Modified to avoid using the CHAR macro in a top level form fluid '(StringGenSym!*); StringGenSym!* := copystring("L0000"); % Copy to force into heap /csp CompileTime flag('(StringGenSym1), 'InternalFunction); lisp procedure StringGenSym(); %. Generate unique string StringGenSym1 4; lisp procedure StringGenSym1 N; %. Auxiliary function for StringGenSym begin scalar Ch; return if N > 0 then if (Ch := Indx(StringGenSym!*, N)) < char !9 then << SetIndx(StringGenSym!*, N, Ch + 1); TotalCopy StringGenSym!* >> else << SetIndx(StringGenSym!*, N, char !0); StringGenSym1(N - 1) >> else % Increment starting letter << SetIndx(StringGenSym!*, 0, Indx(StringGenSym!*, 0) + 1); StringGenSym() >>; end; END;