Artifact 5a0db4ac3adb37ca0e15abc9ec6bbc1c651c4bb3fb2dc52f546f97d8b13db919:
- File
psl-1983/3-1/tests/mini-type-errors.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: 1619) [annotate] [blame] [check-ins using] [more...]
% MINI-TYPE-ERRORS.RED % Almost identical, just faked StdError and Bldmsg procedure TypeError(Offender, Fn, Typ); <<Errorheader(); Prin2 "An attempt was made to do "; prin1 Fn; prin2 " on `"; prin1 Offender; prin2 "', which is not "; print Typ; quit; >>; procedure UsageTypeError(Offender, Fn, Typ, Usage); <<Errorheader(); Prin2 "An attempt was made to use "; prin1 Offender; Prin2 " as "; Prin1 Usage; prin2 " in `"; prin1 Fn; prin2 "`, where "; prin1 Typ; prin2t " is needed"; quit; >>; procedure IndexError(Offender, Fn); UsageTypeError(Offender, Fn, "an integer", "an index"); procedure NonPairError(Offender, Fn); TypeError(Offender, Fn, "a pair"); procedure NonIdError(Offender, Fn); TypeError(Offender, Fn, "an identifier"); procedure NonNumberError(Offender, Fn); TypeError(Offender, Fn, "a number"); procedure NonIntegerError(Offender, Fn); TypeError(Offender, Fn, "an integer"); procedure NonPositiveIntegerError(Offender, Fn); TypeError(Offender, Fn, "a non-negative integer"); procedure NonCharacterError(Offender, Fn); TypeError(Offender, Fn, "a character"); procedure NonStringError(Offender, Fn); TypeError(Offender, Fn, "a string"); procedure NonVectorError(Offender, Fn); TypeError(Offender, Fn, "a vector"); procedure NonWords(Offender, Fn); TypeError(Offender, Fn, "a words vector"); procedure NonSequenceError(Offender, Fn); TypeError(Offender, Fn, "a sequence"); procedure NonIOChannelError(Offender, Fn); TypeError(Offender, Fn, "a legal I/O channel"); End;