next up previous contents
Next: CTRL(C) Trapping Up: TERMINAL INPUT Previous: Expressions   Contents


Conditional execution - IF and DO commands

Structured IF and DO commands are available. Both may be nested deeper than you are ever likely to want. See the next section for full details of the commands. Here I just want you to note that the operation of DO at interactive level is fundamentally different from its operation within command files, in that, after prompting for the DO index and DO range/increment, it then puts you into INSERT mode. Subsequent commands are written to a temporary command file, TEMP.SPX, in your current default directory. INSERT mode is terminated by a CTRL(Z), whereupon the command file is submitted to be run. This means that there is no syntax checking as you enter the commands. If it fails to run you can edit a file TEMP.SPX (or anything else.SPX) and then submit it (via the @ command) as usual.

The IF command cannot be used at interactive level.



Jamie Leech 2004-08-16