Do I understand that correctly?
Say 'blabla' If condition Then say='something' Else say 'still a keyword' The 'meaning' of say depends on condition? a nightmare if true !?! Regards Walter _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
Yes, that is my understanding.
Here is the text from page 79 of the language manual: "Thus, for example, this sequence in a program with no say variable: say 'Hello' say('1') say=3 say 'Hello' would be a say instruction, a call to some say method, an assignment to a say variable, and an error." What I am referring to is that the last "say 'Hello' " is an error. Bill On 3/21/2013 6:16 PM, Walter Pachl wrote: > Do I understand that correctly? > > Say 'blabla' > If condition Then > say='something' > Else > say 'still a keyword' > The 'meaning' of say depends on condition? > > a nightmare if true !?! > > Regards > Walter > > _______________________________________________ > Ibm-netrexx mailing list > [hidden email] > Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ > > > > ----- > No virus found in this message. > Checked by AVG - www.avg.com > Version: 2013.0.2904 / Virus Database: 2641/6172 - Release Date: 03/13/13 > Internal Virus Database is out of date. > > _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by christel.u.w.pachl christel.u.w.pachl
The say='something' would most probably (and shall) give: unknown variable!
Thomas. PS: And this shall be a syntax error, but *not* depending* on condition, Walter! ==================================================== Am 21.03.2013 23:16, schrieb Walter Pachl: > Do I understand that correctly? > > Say 'blabla' > If condition Then > say='something' > Else > say 'still a keyword' > The 'meaning' of say depends on condition? > > a nightmare if true !?! > > Regards > Walter > > _______________________________________________ > Ibm-netrexx mailing list > [hidden email] > Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ > > -- Thomas Schneider, IT Consulting; http://www.thsitc.com; Vienna, Austria, Europe _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
Thomas Schneider, Vienna, Austria (Europe) :-)
www.thsitc.com www.db-123.com |
Actually, Thomas is right (I was mistaken). The error is static and not
dynamic. In trying to test the page 79 code by trying to interpret it, the following: /* NetRexx 3 */ say 'Hello' say('1') if (0) then say=3 -- added: if false say 'Good bye' method say(message) static public say 'Input arg is:' message ---------------------- gives: NetRexx portable processor, version NetRexx 3.01RC2, build 1-20110925-2337 Copyright (c) RexxLA, 2011. All rights reserved. Parts Copyright (c) IBM Corporation, 1995,2008. Program Page_79_test.nrx 5 +++ say 'Good bye' +++ ^^^ +++ Error: Unexpected use of local variable Processing of 'Page_79_test.nrx' failed [one error] -------------------------------- While the following: /* NetRexx 3 */ say 'Hello' say('1') -- if (0) then say=3 -- added: if false say 'Good bye' method say(message) static public say 'Input arg is:' message ------------------- gives (as expected) NetRexx portable processor, version NetRexx 3.01RC2, build 1-20110925-2337 Copyright (c) RexxLA, 2011. All rights reserved. Parts Copyright (c) IBM Corporation, 1995,2008. Program Page_79_test.nrx function say(Rexx) ===== Exec: Page_79_test ===== Hello Input arg is: 1 Good bye Processing of 'Page_79_test.nrx' complete -------------------------------------------------------------------- So I guess the bottom line is that the code on page 79 can not be executed at all, and code similar to what you wrote is similar in that it can not be interpreted or compiled. Note that is apparently true even if the local "say" variable is never created. Bill On 3/21/2013 6:36 PM, Bill Fenlason wrote: > Yes, that is my understanding. > > Here is the text from page 79 of the language manual: > > "Thus, for example, this sequence in a program with no say variable: > say 'Hello' > say('1') > say=3 > say 'Hello' > would be a say instruction, a call to some say method, an assignment > to a say variable, and an error." > > What I am referring to is that the last "say 'Hello' " is an error. > > Bill > > > The say='something' would most probably (and shall) give: unknown > variable! > Thomas. > PS: And this shall be a syntax error, but *not* depending* on > condition, Walter! > ==================================================== > Am 21.03.2013 23:16, schrieb Walter Pachl: >> Do I understand that correctly? >> >> Say 'blabla' >> If condition Then >> say='something' >> Else >> say 'still a keyword' >> The 'meaning' of say depends on condition? >> >> a nightmare if true !?! >> >> Regards >> Walter >> >> _______________________________________________ >> Ibm-netrexx mailing list >> [hidden email] >> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ >> >> > > _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In traditional Rexx, it's not ambiguous at all:
Ready; T=0.01/0.01 08:55:11 testsay Testing say; keyword or variable Is say a keyword? notsay Ready; T=0.01/0.01 08:55:17 type testsay exec /* */ say 'Testing say; keyword or variable' If 1 = 1 then say = 'notsay' else say 'keyword' say 'Is say a keyword?' say say Ready; T=0.01/0.01 08:57:50 So... If you're trying to be compatible with the original Rexx language, then you've missed the mark. -- Robert P. Nix Mayo Foundation .~. RO-OC-1-18 200 First Street SW /V\ 507-284-0844 Rochester, MN 55905 /( )\ ----- ^^-^^ "In theory, theory and practice are the same, but in practice, theory and practice are different." On 3/21/13 7:44 PM, "Bill Fenlason" <[hidden email]> wrote: > Actually, Thomas is right (I was mistaken). The error is static and not > dynamic. > In trying to test the page 79 code by trying to interpret it, the following: > > /* NetRexx 3 */ > say 'Hello' > say('1') > if (0) then say=3 -- added: if false > say 'Good bye' > > method say(message) static public > say 'Input arg is:' message > > ---------------------- gives: > NetRexx portable processor, version NetRexx 3.01RC2, build 1-20110925-2337 > Copyright (c) RexxLA, 2011. All rights reserved. > Parts Copyright (c) IBM Corporation, 1995,2008. > Program Page_79_test.nrx > 5 +++ say 'Good bye' > +++ ^^^ > +++ Error: Unexpected use of local variable > Processing of 'Page_79_test.nrx' failed [one error] > -------------------------------- > > While the following: > > /* NetRexx 3 */ > say 'Hello' > say('1') > -- if (0) then say=3 -- added: if false > say 'Good bye' > > method say(message) static public > say 'Input arg is:' message > > ------------------- gives (as expected) > NetRexx portable processor, version NetRexx 3.01RC2, build 1-20110925-2337 > Copyright (c) RexxLA, 2011. All rights reserved. > Parts Copyright (c) IBM Corporation, 1995,2008. > Program Page_79_test.nrx > function say(Rexx) > ===== Exec: Page_79_test ===== > Hello > Input arg is: 1 > Good bye > Processing of 'Page_79_test.nrx' complete > > -------------------------------------------------------------------- > > So I guess the bottom line is that the code on page 79 can not be > executed at all, and code similar to what you wrote is similar in that > it can not be interpreted or compiled. Note that is apparently true > even if the local "say" variable is never created. > > Bill > > > On 3/21/2013 6:36 PM, Bill Fenlason wrote: >> Yes, that is my understanding. >> >> Here is the text from page 79 of the language manual: >> >> "Thus, for example, this sequence in a program with no say variable: >> say 'Hello' >> say('1') >> say=3 >> say 'Hello' >> would be a say instruction, a call to some say method, an assignment >> to a say variable, and an error." >> >> What I am referring to is that the last "say 'Hello' " is an error. >> >> Bill >> >> > On 3/21/2013 6:39 PM, Thomas Schneider wrote: >> The say='something' would most probably (and shall) give: unknown >> variable! >> Thomas. >> PS: And this shall be a syntax error, but *not* depending* on >> condition, Walter! >> ==================================================== >> Am 21.03.2013 23:16, schrieb Walter Pachl: >>> Do I understand that correctly? >>> >>> Say 'blabla' >>> If condition Then >>> say='something' >>> Else >>> say 'still a keyword' >>> The 'meaning' of say depends on condition? >>> >>> a nightmare if true !?! >>> >>> Regards >>> Walter >>> >>> _______________________________________________ >>> Ibm-netrexx mailing list >>> [hidden email] >>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ >>> >>> >> >> > > _______________________________________________ > Ibm-netrexx mailing list > [hidden email] > Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ > _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
Free forum by Nabble | Edit this page |