Syntactically, it would be a category of Expression term. So in the manual,
it would probably be described as a new section 1.11.7 following the new
array terms. Syntactically, it is a prefix '>' or '<' followed by a either
a simple variable symbol or a stem variable symbol (no compound). The
effect it to create a VariableReference object instance that holds a
reference to the specified variable.

On Fri, Feb 1, 2019 at 3:36 PM Erich Steinböck <erich.steinbo...@gmail.com>
wrote:

> I'm working on updating rexxref and rexxp for Variable References and need
> to dig deeper: syntactically, what is a Variable Reference?
>
> We have symbols, terms (plain, message, and array terms) and expressions.
> How do Variable References fit in?
>
> I'm struggling, because
>
> >a~name    wont work, but
>

Why do you say this won't work? The ">a" creates a variable reference
object. Variable references have a NAME method, so that will display "A".


> v = >a; v~name    will.
> x = >a~name    will work too.
>
> parse var >a v1 v2    won't work, but
> v = >a; parse var v v1 v2    will
>
A variable reference term is not a syntactic standin for a variable, so
"parse var >a" because the instruction expects a variable. You would need
to use

parse value >a with v1 v2

The second case works because the parse instruction is syntactically value.
The variable V evaluates to the variable reference instance. When the parse
instruction asks the variablereference object for its string value to
parse, it evaluates the variable it refers to and returns its string
value.

Rick

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

Reply via email to