Please enable JavaScript to view this site.

A-Shell Reference

xcall MIAMEX, MX_NXTCMD, cmdline, status {,flag}

MX_NXTCMD (MIAMEX 18) returns (and in doing so, by-passes) the next line of the current command (.CMD or .DO) file.

Parameters

cmdline should be a string variable long enough to return any expected command line.

status is a floating-point return code indicating the success of the operation. A zero value indicates that either no command file is running, or the end of the current command file has been reached. A non-zero value indicates success, in which case cmdline contains the text of the command line.

If flag (Num) is specified and evaluates to a non-zero value, then the next line of the command file (returned in cmd) will not be removed from the current command file—i.e., a non-destructive read.

Comments

This function is used in the implementation of GOTO.LIT in order to skip over the command line contents up to the target label. The technique can also be useful in a case where you want to effectively abort a command file execution in response to some data or environmental condition, perhaps chaining to another command file instead.