GoTo - branch to a label in the script file

Return to Introduction  Previous page  Next page

goto label:

Where:

labelis a label in the script. label names are case sensitive, contain no embedded blanks and end with a colon. This parameter may be a variable containing a label name.        

 

The goto command branches to the specified label. Labels are defined by placing a label name on a script line starting in column one.

Examples

goto TEST_LABEL:

goto LABEL1:

goto $LABELNAME

 

Sample Script

' The script prompts the user for the answer to 2 + 2.

' If the user response is incorrect, the prompt is repeated.

'

Retry:

$response = AskFor("What is 2 + 2?")

if $response = 4 then goto Correct:

MsgBox("Incorrect, try again.")

goto Retry:

Correct:

MsgBox("Correct!")

exit

 

See Also:

 

Script Command Summary

Script Variables

Using the Scripting Language


TN3270 Plus is continually being improved. To learn more about the latest enhancements, please review our Version History web page.