Or .. how about simple parentheses -- as already used in PARSE for a similar
purpose, for example? [I think we also considered CALL (foo) a,b once,
to allow call by a variable name.]
Considered? It has been implemented since the original Object Rexx version.
And the bit inside the parens is a generalized expression, not limited to
just a variable. Even PARSE no longer has a limitation of just a variable
name but has been opened up to an expression.
Ah yes .. remember now; just never had occasion to use it!
I had already considered the parenthesis approach and rejected it (I have
been thinking about this problem for 14 years :-)). Using parenthesis means
a) This is a special syntax that only applies to argument expressions with
special rules, b) Would probably break programs for people who insist on
coding call as "call foo(var)". I had also considered using square brackets
in a similar fashion.
OK.
The syntax I have now uses a general expression operator with no
compatibility problems.. This is not limited to just argument expressions.
So, for example, I can do
ref = &a
To obtain a reference to variable A. I'd prefer to keep this approach,
though am flexible on the "spelling" of the argument. I'm loathe to use "^"
because some Rexx implementations have accepted that as a synonym for
"prefix not" because of how the terminal emulators insisted on mapping the
mainframe logical not character. "@" might make sense, but this will reraise
the old mainframe variable name compatibility issue. "<-" might work, but
the USE ARG end really should be the other direction "->". I suspect this
would be difficult to work with and people would have a hard time
remembering which arrow to use in which place, which is the nice part about
using the same notation everywhere.
Yes, I wasn't keen on arrows or '^' either :-).
But I'm even more un-keen on '&'. <<shudder>>
How about '*', then, as being still being one of the two ends of the C
notation?
Mike
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel