Artifact 7009645941d02c0623f8524a8f82854f0d2de645a544890fac0d3e23ea93102a:
- File
psl-1983/3-1/tests/main2.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: 2161) [annotate] [blame] [check-ins using] [more...]
- File
psl-1983/tests/main2.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: 2161) [annotate] [blame] [check-ins using]
% MAIN2.RED - Test Byte and String I/O, some PRINT ing % Need: SUB2.RED simple print routines IN "XXX-HEADER.RED"$ on SysLisp; % some strings to work with WString TestString = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUnVvWwXxYyZz"; Wstring Buffer[100]; syslsp Procedure FirstCall; begin scalar X, Y; init(); % test STRINF Putc Char S; PutC Char Lower t; PutC Char Lower r; Putc Char I; Putc Char Lower n ; Putc Char Lower f; Putc Char Eol; X:=TestString; Y:=StrInf(X); PutInt X; PutC Char '! ; PutInt Y;PutC Char EOL; % test STrlen Putc Char S; PutC Char Lower t; PutC Char Lower r; Putc Char Lower l; Putc Char Lower e; Putc Char Lower n; Putc Char Eol; X:=StrLen(testString); PutInt X;PutC Char '! ;PutInt 51;PutC Char EOL; % test Byte access. X:=TestString+AddressingUnitsPerItem; Putc Char B; PutC Char Lower y; PutC Char Lower t; Putc Char Lower e; Putc Char Eol; For i:=0:10 do <<Y:=Byte(X,i); PutInt i; PutC Char '! ; PutInt Y; PutC Char '! ; PutC Y; PutC Char EOL>>; % Now a string: Putc Char S; PutC Char Lower t; PutC Char Lower r; Putc Char Lower i; Putc Char Lower n; Putc Char Lower g; Putc Char Eol; Prin2String TestString; Terpri(); Prin1String "----- Now input characters until #"; Terpri(); while (X := GetC X) neq char !# do PutC X; Print '"----- First Print Called"; Print '1; Print 'ANATOM; Print '( 1 . 2 ); Print '(AA (B1 . B2) . B3); Print '(AA (B1 . NIL) . NIL); Prin2T "Expect UNDEFINED FUNCTION MESSAGE for a function of 3 arguments"; ShouldNotBeThere(1,2,3); quit; 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;