#46 WSC-support: do not inject argument

None
open
nobody
None
5
2012-08-22
2005-02-23
No

In the present implementation of Object REXX,
WSC-methods may get their arguments shifted, when the
runtime system inserts an argument to indicate how the
routine was called: as a GET or PUT routine/method.

Instead enhance the "PARSE SOURCE" statement such, that
the second word is set to "GET" or "PUT", indicating
how the Rexx routine is invoked.

Then, please remove the behaviour that the runtime
changes/shuffles arguments, which may introduce very
subtle errors for Rexx programmers (and IMHO is very
"un-Rexxish").


Here is the citation from the reference manual
referring to WSH informing the reader of what the
runtime does:

"The WSH supports various syntax combinations in the
case of implementing a property as a function. In all
combinations, the function is named in the <property>
section or tag. It assumes that, when no function is
named, the property is a variable; however, it does not
enforce this assumption. It is possible to name a
property and define it as a function. Object REXX
defines this to mean that the function must be invoked
whenever a property access is attempted. Object REXX
notifies the function of the intended access direction
by inserting GET or PUT as the first argument, and
shifting all original arguments accordingly; that is,
the original first argument is the second, the second
is the third, and so on. For a demonstration of this
behavior, see the Call_PropertyORexx.wsf sample in the
Samples\WSH subdirectory of your Object REXX for
Windows installation directory. "

Discussion


Anonymous


Cancel   Add attachments