Missatge de Tony Harminc <[email protected]> del dia dv., 23 de gen. 2026 a
les 21:33:

> On Fri, 23 Jan 2026 at 06:09, Josep Maria Blasco
> <[email protected]> wrote:
> >
> > I'd like to fix the taxonomy of ooRexx symbols.
> >
> > Currently, 1.13 says "The meaning of a symbol in Rexx varies according
> to its context. As a term in an expression, a symbol belongs to one of the
> following groups: (1) constant symbols, (2) simple symbols, (3) compound
> symbols, (4) environment symbols, and (5) stems. Constant symbols cannot be
> assigned new values" (parenthesized numbers are mine). This section is
> using what I consider to be the right taxonomy.
> >
> > 1.13.2 "Constant Symbols", however, says "A constant symbol starts with
> a digit (0-9) or a period", then adds, in the next paragraph, "You cannot
> change the value of a constant symbol. It is simply the string consisting
> of the characters of the symbol (that is, with any lowercase alphabetic
> characters translated to uppercase)". But then, after some examples, it
> adds "Constant symbols, where the first character is a period, which have
> at least one other character, and which are not a valid Rexx number, are
> environment symbols and may have a value other than the symbol name".
> >
> > I propose to rephrase 1.13.2 as follows:
> >
> > A constant symbol starts with a number, consists of a single period, or
> is a valid Rexx number.
>
> Lurker here, been reading for years.  I find this confusing. By
> "number", do you mean "digit"?


Yes, thank you, I meant "digit", not "number".


> Or perhaps "decimal digit"? Surely
> 123xyz is not a constant symbol,


Yes it is. Rexx is a little strange in this respect.


> but I think it matches your suggested
> description. Or by "number" do you mean a REXX number, in which case
> 123E4 would be valid, and so 123E4qwx would also be valid?


123E4qwx is also a constant symbol. The only case where "number" is not
equivalent to "digit" in the context we are referring to is when the
"number" has a signed exponent, like in 1.23E+45xyz, which is not a
constant symbol.

So I think
> the original wording "A constant symbol starts with a digit (0-9) or a
> period" is quite clear, if it's true.
>

Unfortunately, it is not true. .ABC, for example, starts with a period, but
it is an environment symbol, which can have its value changed, and
therefore we should not call it "a constant symbol".

Classic Rexx has variables and constant symbols (numbers are a special form
of constant symbol). ooRexx introduces environment symbols, which are not
constant but *were* constant in Classic Rexx. Because of that, some of the
old conventions remain in the documentation. That's what I am trying to fix.

>
> And I don't think that "Constant symbols, where the first character is
> a period, which have at least one other character, and which are not a
> valid Rexx number, are environment symbols and may have a value other
> than the symbol name" is inconsistent with "You cannot change the
> value of a constant symbol". These are simply talking about different
> properties. I would suggest that if you *can* change a constant
> symbol, then some thought should be given to using another term. If
> it's constant it's surely unchangeable, no?
>

We agree on that.

>
> > You cannot change the value of a constant symbol. It is simply the
> string consisting of the characters of the symbol (that is, with any
> lowercase alphabetic characters, if any, translated to uppercase.
>
> You have "any" twice. Drop the ", if any," .
>

Thanks again, I had overlooked the first "any".

>
> > I would also suppress the last paragraph starting with "Constant
> symbols, where the first character is a period..."
> >
> > If nobody objects, I will implement these changes (I'm not a native
> English speaker, so that style corrections are always welcome).
> >
> > In a second pass, I'll review all the places in rexxref referencing
> "constant symbols" to see if the reference should be changed to also
> include environment symbols.
>
> It sounds as though in between passes the document may be wrong.
>

The document is already wrong in its current state, but yes, you're true.
In any case, I can always commit the two passes at once :)

  Josep Maria


> > See also  https://sourceforge.net/p/oorexx/documentation/337/
>
> Tony H.
>
>
> _______________________________________________
> Oorexx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to