On Sun, 23 Oct 2022 18:54:43 +0200, Erich Steinböck wrote:

>> So "constant expression" here should really just be "constant symbol."
>.true, .nil, etc. are environment symbols.

I was avoiding that distinction because the doc doesn't specifically say
that environment symbols are *not* constant symbols.  Their values may
change, but in terms of syntax they're constant in the sense that they
can't be used in variable assignments, and SYMBOL() returns 'LIT' for
them, the same as for other constant symbols.

I need to update my old statement about incompatibilties between Classic
and Object Rexx.  Long ago I wrote that assignment of a stem object was
the only substantial one.  Somehow I completely overlooked the initial
values of environment symbols!  If your code depends on knowing the value
of a symbol starting with a dot or evaluating it with VALUE(), it'll run
into trouble with the names of any of the various classes, runtime
objects, and environment constants--and any environment symbols its
caller has assigned.  A surprising quirk there is that nothing prevents
you from assigning a symbol that's a number: 

  /* caller */
  .local~1 = 2
  Say pointone() /* returns 2 */

  /* pointone */
  Return .1


¬R




_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to