Artifact 498e774757356fa75a2bb7d7a0c7d4c22ffa481cda76238beebb1e831e03ef08:
- File
psl-1983/3-1/tests/mini-cons-mkvect.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: 729) [annotate] [blame] [check-ins using] [more...]
- File
psl-1983/tests/mini-cons-mkvect.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: 729) [annotate] [blame] [check-ins using]
% MINI-CONS.RED : Cons, MkVect etc for testing %/Almost identical to PK:CONS-MKVECT on syslisp; procedure HardCons(x,y); Begin scalar c; c:=GtHeap PairPack(); c[0]:=x; c[1]:=y; Return MkPAIR(c); End; procedure Cons(x,y); HardCons(x,y); procedure Xcons(x,y); HardCons(y,x); procedure Ncons x; HardCons(x,'NIL); syslsp procedure MkVect N; % Allocate vector, init all to NIL if IntP N then << N := IntInf N; if N < (-1) then StdError '"A vector with fewer than zero elements cannot be allocated" else begin scalar V; V := GtVect N; for I := 0 step 1 until N do VecItm(V, I) := NIL; return MkVEC V; % Tag it end >> else NonIntegerError(N, 'MkVect); off syslisp; End;