Artifact 886cec5eb1524975d496d4fadeba48813f954cb1d07e898c62c28c88198fa71a:
- File
psl-1983/3-1/tests/main3.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: 1404) [annotate] [blame] [check-ins using] [more...]
- File
psl-1983/tests/main3.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: 1404) [annotate] [blame] [check-ins using]
% MAIN3.RED - Test CASE and CONS % Need: SUB2.RED simple print routines % SUB3.RED simple allocator IN "XXX-HEADER.RED"$ IN "PT:STUBS3.RED"$ on syslisp; syslsp Procedure FirstCall; begin scalar X, Y; Init(); Print '"MAIN3: Casetest"$ CaseTest(); Print '"MAIN3: test CONS"$ InitHeap(); ConsTest(); quit; end; syslsp procedure CaseTest; <<Prin2t '"Test case from -1 to 11"; Prin2t '"Will classify argument"; Ctest (-1); Ctest 0; Ctest 1; Ctest 2; Ctest 3; Ctest 4; Ctest 5; Ctest 6; Ctest 7; Ctest 8; Ctest 9; Ctest 10; Ctest 11; Ctest 12>>; syslsp procedure CTest N; Case N of 0: Show(N,"0 case"); 1,2,3: Show(N,"1,2,3 case"); 6 to 10:Show(N,"6 ... 10 case"); default:Show(N,"default case"); end; syslsp procedure Show(N,S); <<Prin2String "Show for N="; Prin1Int N; Prin2String ", expect "; Prin2String S; Terpri()>>; Procedure CONStest(); Begin scalar Z,N; Z:='1; N:='2; While N<10 do <<z:=cons(N,z); Print z; N:=N+1>>; End; FLUID '(UndefnCode!* UndefnNarg!*); syslsp procedure UndefinedFunctionAux; % Should preserve all regs <<Terpri(); Prin2String "**** Undefined Function: "; Prin1ID LispVar UndefnCode!*; Prin2String " , called with "; Prin2 LispVar UndefnNarg!*; Prin2T " arguments"; Quit;>>; Off syslisp; End;