GOTO — Transfer control to a label in a command script

Synopsis

GOTO [/?] [/I] label

Options

/?
Display command syntax information.
/I
Do not cancel the current nesting

Description

The GOTO command is only valid within command scripts, and transfers control to the line in the script that immediately follows the specified label. The search for the label always begins at the top of the command script, so if a script contains several identical labels, only the first label will ever be used.

The label name supplied must exactly match, except for case, the label in the script. All characters in the name are significant, spaces count, and the label name may contain any number of words. This is different to the 16-bit CMD supplied with IBM OS/2, where only the first 8 characters are significant, and where spaces or full stop characters terminate the label and cause any further characters to be ignored.

CALL EXTPROC FOR GOSUB IF RETURN CANCEL QUIT EXIT


The 32-bit Command Interpreter is © Copyright Jonathan de Boyne Pollard. "Moral" rights are asserted.