sfk@otter.hpl.hp.com (Steve Knight) writes:
> Date: 13 Apr 93 17:02:05 GMT
> Organization: Hewlett-Packard Laboratories, Bristol, UK.
>
> Here's a little test for Pop-11 language lawyers everywhere ....
>
> Before trying this out, guess whether "X" is a lexical or dynamic variable
> in the following example :-
>
> define foo( X );
> lconstant a = ( lvars X = 99.dup; );
> isident( ident X ) =>
> enddefine;
This version may be even more surprising, and may give a clue as
to what is happening in Steve's example:
define foo2( X );
lconstant a = ( X => lvars X = 99.dup; );
isident( ident X ) =>
enddefine;
foo2(66);
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> WARNING: this code seems to causes core dumps on my machine -- so make
> sure your work is backed up before trying this. I think this is
> because of a local problem, but I've got no easy way of proving
> that.
It worked OK for me in Poplog V14.2 on a SPARC server running SunOS,
and in Poplog V14.1 on a HP M68040 running HP-UX
Aaron
---
--
Aaron Sloman,
School of Computer Science, The University of Birmingham, B15 2TT, England
EMAIL A.Sloman@cs.bham.ac.uk OR A.Sloman@bham.ac.uk
Phone: +44-(0)21-414-3711 Fax: +44-(0)21-414-4281
|