Syntax |
Goto label |
Description |
Transfers execution to the line containing the specified label. |
Comments |
The compiler will produce an error if label does not exist. The label must appear within the same subroutine or function as the Goto. Labels are identifiers that follow these rules:
Labels are not case-sensitive. |
Example |
This example gets a name from the user and then branches to a statement, depending on the input name. If the name is not MICHAEL, it is reset to MICHAEL unless it is null or the user clicks Cancel--in which case, the program displays a message and terminates. Sub Main() WrongName: RightName: |
See Also |
|
Note: |
To break out of an infinite loop, press Ctrl+Break. |
G |