Artifact 4ae92b191afe2088d34d73caa72c0a8e06ca018ac5e86efb16f83ebd2acabb84:
- File
psl-1983/3-1/tests/mini-arithmetic.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: 979) [annotate] [blame] [check-ins using] [more...]
- File
psl-1983/tests/mini-arithmetic.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: 979) [annotate] [blame] [check-ins using]
% MINI-ARITHMETIC.RED simple ARITHmetic functions Procedure Plus2(x,y); if numberp x and numberp y then sys2int(wplus2(intinf x,intinf y)) else NonNumberError(cons(x,y),'Plus2); Procedure Minus(x); if numberp x then sys2int wminus intinf x else NonNumberError(x,'Minus); Procedure Add1 N; If Numberp N then sys2int wplus2(N,1) else else NonNumberError(N,'Add1); Procedure SUB1 N; If Numberp N then sys2int wdifference(N,1) else NonNumberError(N,'SUB1); Procedure GreaterP(N1,N2); If NumberP N1 and NumberP N2 then wGreaterp(intinf N1,intinf N2) else NIL; Procedure LessP(N1,N2); If NumberP N1 and NumberP N2 then Wlessp(intinf N1,intinf N2) else NIL; Procedure DIFFERENCE(N1,N2); If NumberP N1 and NumberP N2 then sys2int wdifference(intinf N1,intinf N2) else NonNumberError(cons(N1,N2),'Difference); Procedure TIMES2(N1,N2); If NumberP N1 and NumberP N2 then sys2int Wtimes2(intinf N1,intinf N2) else NonNumberError(cons(N1,N2),'TIMES2); End;