Rewritten May 2026
xcall LSTLIN, cmdline
LSTLIN retrieves the complete command line from which the current program was launched.
Parameters
cmdline (String) [out]
Returns the complete command line, optionally stripped of trailing comments
Comments
The returned cmdline will be similar to the CMDLIN{$} system variable, except:
| • | It is not folded to upper case, while CMDLIN is. |
| • | It includes the name—and any device or PPN, if specified—of the current program, while CMDLIN only includes the part of the command line following the current program name, i.e. its arguments. |
| • | It does not require COMPIL /X:1 or higher, while CMDLIN does. Otherise, it is treated as a ordinary variable with no special meaning. |
For example:
Program LSTLIN,1.0(100)
MAP1 A$,S,100
? "CMDLIN$ = [";CMDLIN$;"] (requires /X:1+)"
? "CMDLIN = [";CMDLIN;"] (same as CMDLIN$)"
xcall LSTLIN,A$
? "XCALL LSTLIN = [";A$;"]"
If the program above is compiled with COMPLP (or COMPIL /X:1 or /X:2), the command line below will produce the following output:
.run dsk0:lstlin[150,277]/hello world
CMDLIN$ = [/HELLO WORLD] (requires /X:1+)
CMDLIN = [/HELLO WORLD] (same as CMDLIN$)
XCALL LSTLIN = [dsk0:lstlin[150,277]/hello world]
See Also
• SBR=LSTLINSTRIP (strip trailing comments)
• CMDLIN