[AmigaOS 3.1 Command Reference/Skip]
Format: SKIP [<label>] [BACK]
Template: LABEL, BACK/S
Purpose: To skip to a label when executing script files.
SKIP is used in scripts to allow you to skip ahead in the script to a <label>
defined by a LAB statement. If no <label> is specified, SKIP jumps to the
next LAB statement.
SKIP always searches forward from the current line of the file. However,
when the BACK option is used, SKIP starts searching for the label from the
beginning of the file. This allows SKlPs to points prior to the SKIP
You can only SKIP as far back as the last EXECUTE statement. If there are no
EXECUTE statements in a script, you will SKIP back to the beginning of the
If SKIP does not fnd the label you specifed, the command sequence terminates
and the message "Label <label> not found by Skip" is displayed.
Assume you have the following script, called CheckFile:
IF exists <name>
ECHO "<name> is not in this directory."
ECHO "The <name> file does exist."
You can run the script by entering:
1> EXECUTE CheckFile Document
If the Document file exists in the current directory, the execution of the
script will SKIP ahead to the LAB command. The message:
The Document file does exist
Will be displayed in the Shell window.
If the Document file is not in the current directory, the execution of the
script will jump to the line after the ELSE statement, and the message:
Document is not in this directory
Will be displayed.
Converted from AmigaGuide to HTML by Jaruzel