goto
MicroBlaster edited this page Nov 10, 2019
·
2 revisions
Purpose: Jumps to a different area within the script.
Syntax: goto {label}
{label}: A label within the script to jump to.
Notes: This command will immediately jump execution of the script to a label anywhere within the script or its included routines.
Example:
# Goto example:
echo "About to jump to another part of my script"
goto :otherPart
echo "I should never execute this command"
:otherPart
echo "I've just jumped to a different part of my script"
halt
.