Hitachi

JP1 Version 12 JP1/IT Desktop Management 2 Distribution Function Administration Guide


18.6.2 Label

To use the goto statement to directly jump to any other statement, you have to add a label at the destination statement.

A label is specified in the identifier: format. You may declare a label at any position in the MAIN and ERROR sections. You must specify a unique label name according to the same rules as for variables and constants. You must not reuse any variables and constants as labels.

The label has no meaning in any sections other than MAIN and ERROR. It only has meaning if it is associated with a goto statement. If a label is not associated with any goto statement, the program does not interpret the label but outputs a warning message.

Organization of this subsection

(1) Format

Label statement
identifier:

(2) Example of coding

AIT_MessageBox("ss","xx");
goto label18;
   AIT_LogMessage("LBL040: NOT DISPLAYED 29");
                    // Not executed
   label18:         // The control shifts here.
   AIT_LogMessage("LBL040: INSIDE LABELLED STATEMENT");
                    // Executed
   AIT_Exit();