It's a bug in your program. This is an UNKNOWN method, so the arguments to the method are the message name and an array of arguments to the original message. Using the default ARGUMENTS value will pass those along as the arguments, which is not likely to be valid for what you are trying to do. The FORWARD instruction is doing exactly what the documentation says it does.
Rick On Sun, Oct 31, 2021 at 8:11 AM Rony G. Flatscher <rony.flatsc...@wu.ac.at> wrote: > The documentation to FORWARD (cf. "2.8. FORWARD") states among other > things: > > If you specify neither ARGUMENTS nor ARRAY, the language processor uses > the same arguments > specified on the original method call. > > In the following UNKNOWN method the forward keyword statements do not > contain ARGUMENTS nor ARRAY subkeywords, yet the arguments do not get > forwarded: > > ::method unknown -- counts # of invocations > expose counter name > use arg msg, args > counter+=1 > > .stderr~say("#" .line": name="pp(name) "counter="pp(counter) "msg="pp(msg) > "args[1]="pp(args[1]) ) > > select case name > when "NoOp-input" then forward message (msg) to (.stdin) > when "NoOp-output" then forward message (msg) to (.stdout) > when "NoOp-error" then forward message (msg) to (.stderr) > end > > .stderr~say("#" .line": .input="pp(.input~current) > ".output="pp(.output~current) ".error="pp(.error~current)) > > Adding > > ARGUMENTS (args) > > to the forward statements will forward the received arguments. > > Is this a bug in FORWARD or in its documentation? > > ---rony > > > _______________________________________________ > 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