From: SourceForge.net <no...@so...> - 2008-08-13 00:44:47
|
Bugs item #2048379, was opened at 2008-08-12 14:59 Message generated for change (Comment added) made by wb4alm You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=684730&aid=2048379&group_id=119701 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Interpreter Group: None Status: Closed Resolution: Invalid Priority: 5 Private: No Submitted By: W.W. Turner III (Bill) (wb4alm) Assigned to: Nobody/Anonymous (nobody) Summary: syntax parsing error Initial Comment: The statement say " step2c: if ("((leftdigit%2)*2)") =" leftdigit results in an error message: REX0043E: Error 43 running /home/bill/RexxProduction/ABA/evenodd.rex line 74: Routine not found REX0417E: Error 43.1: Could not find routine " step2c: if (" which should not have been issued because the "IF (" is inside a quoted literal. if, however, you place a blank after the second (") quote mark and also before the Third quote. the statement will be processed correctly. See additional notes inside the attached example program. ---------------------------------------------------------------------- >Comment By: W.W. Turner III (Bill) (wb4alm) Date: 2008-08-12 20:44 Message: Logged In: YES user_id=619806 Originator: YES The intent was that the " was the end of the literal and I have not had to use the explicit || before... I frequently place a say in front of a working statement and add a few quotes to produce "debugging" statements (less output then the builtin trace system.) and I was not aware of " the Literal string immediately followed by a ( " being treated as a function call. Do you remember when this became part of the overall REXX spec and what the intent was? or is this fallout caused by the internal conversion of "classic style" to an "oo style"? All of my early books on rexx are packed away, so I can't look it up. I can see where abc( would be treated as a function call, but I'm not sure why 'abc'( would be treated that way too. in my way of thinking def = 'abc'(xyz%2)*2) should result in def being assigned the value 'ABC' followed by a number using implied concatenation rules. Just curious and always learning <grin> ---------------------------------------------------------------------- Comment By: Rick McGuire (bigrixx) Date: 2008-08-12 15:12 Message: Logged In: YES user_id=1125291 Originator: NO This IS getting parsed correctly. Your literal string has embedded " characters within it, which terminate that literal. You need to double up the embedded literals or use the alternate ' form to get this to work. say " step2c: if (""((leftdigit%2)*2)"") =" leftdigit or say " step2c: if ('((leftdigit%2)*2)') =" leftdigit Or, if you really intended that " to be the end of the literal portion, then you need to use the explicit || operator to perform the concatenation because a literal string immediately followed by a ( is interpreted as a function call....which would give precisely the error you received. say " step2c: if ("||((leftdigit%2)*2)") =" leftdigit ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=684730&aid=2048379&group_id=119701 |