[To reply replace "Aaron.Sloman.XX" with "A.Sloman"]
pop@roo.cs.umass.edu (Robin Popplestone) writes:
> Date: 2 Nov 1999 19:01:56 GMT
>
> Compare and contrast:
>
> define fred(x) with_nargs 255;
>
> enddefine;
>
> [error reported]
i.e. (illegal value for with_nargs): 255
>
> with:
>
> define fred(x);
>
> enddefine;
>
> 255->pdnargs(fred);
No error.
However this produces an error:
256->pdnargs(fred);
;;; MISHAP - INTEGER BETWEEN 0 AND 255 NEEDED
;;; INVOLVING: 256
In REF SYNTAX it states
The integer supplied after "with_nargs" must be >= 0 and <= 254.
though it doesn't say why.
From looking at the code in $popsrc, in the two files
pop11_syntax.p
procedure.p
There is clearly an inconsistency.
In $popsrc/pop11_syntax.p we find in the code for with_nargs:
if isinteger(item) and 0 fi_<= item and item fi_< 255 then
item -> nargs
else
Pdr_error(item, 1, 'illegal value for with_nargs')
endif
Whereas in $popsrc/procedure.p
define updaterof pdnargs(_nargs, p);
lvars p, _nargs;
Check_integer_range(_nargs, 0, 16:FF);
Presumably either the first one should have been fi_< 256 or the
second should have used 16:FE ?
I can't tell whether the 255 case is already used somewhere by the
system.
Aaron
===
--
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK
EMAIL A.Sloman AT cs.bham.ac.uk (NB: Anti Spam address)
PAPERS: http://www.cs.bham.ac.uk/research/cogaff/
|