[AmigaOS / ApolloOS Command Reference\Skip] 
 

SKIP

Format: SKIP [<label>] [BACK] Template: LABEL, BACK/S Purpose: To skip to a label when executing script files. Path: Internal Specification: 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 command. 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 file. If SKIP does not fnd the label you specifed, the command sequence terminates and the message "Label <label> not found by Skip" is displayed. Example: Assume you have the following script, called CheckFile: .KEY name IF exists <name> SKIP message ELSE ECHO "<name> is not in this directory." QUIT ENDIF LAB message 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. See also: EXECUTE LAB