| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | REXX syntax-checker |
On Friday, 96/01/05, Ruud Senden wrote to David Noon about "REXX syntax-checker" as follows: RS> DN> This is not correct. The code -- other than inside INTERPRET RS> DN> statements -- is syntax checked by the tokenizer when the REXX exec RS> DN> is loaded. RS> RS> Well, I have tried some things, but it doesn't recognize the RS> errors I introduced. For example, if a long REXX-command is divided RS> over multiple lines, there should be a , at the end of each line as RS> a continuation character. But when I leave the , away, the RS> REXX-program still runs, until it comes to that piece of code, RS> where REXX generates a syntax error. Hi Ruud, As I said in my other message, what you are seeing here is REXX ignoring something it cannot fathom and passing it to CMD.EXE -- or whatever subcommand handler is handling the default ADDRESS. There might be enough remnants of your source that are almost valid REXX and these would give you a syntax error. Syntax checking will only be effective if your code is close to valid. Anything that looks like complete gobbledy-gook to REXX will be retained as is and passed to the ADDRESS handler that is active at exxecution time. However, a long REXX statement should burp at load time with a comma missing. You wrote "REXX-command", so I am not sure whether you mean an OS/2 command that REXX is to pass to CMD.EXE or a native REXX statement. If it is a command, rather than a statement, syntax errors will not be detected until run time, because it isn't REXX syntax. I try to avoid issuing OS/2 commands when I am writing a REXX exec. I find that using native REXX statements gives me much tighter checking of my program's syntax, simply because it is all REXX syntax. Of course, sometimes issuing a command is unavoidable, but then I always use ADDRESS 'CMD' '' so that it is brought back into REXX syntax for load-time checking. This approach also allows me to issue OS/2 commands when CMD.EXE is not the default subcommand handler, such as in a PM program prepared by VisPro REXX. Regards Dave --- Maximus/2 3.01* Origin: DoNoR/2,Woking UK (44-1483-725167) (2:440/4) SEEN-BY: 270/101 620/243 711/401 409 410 413 430 808 809 934 955 712/407 515 SEEN-BY: 712/517 628 713/888 800/1 7877/2809 @PATH: 440/4 141/209 270/101 712/515 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.