Top > Lycia reference > Querix 4GL > Statements > LABEL
To meet your needs, we constantly work to improve Querix products.
This means that Lycia documentation is developing as well.
In case you have found a certain dissonance between the provided information and the actual behavior of Lycia 3 and/or your applications, please, let us know about this via documentation@querix.com so that we can introduce the necessary changes to our documentation.
Thank you for your attention and cooperation.
LABEL statement serves as a marker for the GOTO statement, and marks the statement to be executed after 4GL passes control to it from the corresponding GOTO statement.
Element |
Description |
Label-name |
The name of a label |
The LABEL statement indicates the place to which the program control will be passed after the corresponding GOTO statement is executed. The GOTO and the LABEL statement must be in the same program block. For more information see the "GOTO" statement section.
There are some restrictions applied to the LABEL statement:
The label-name must be unique within the program block
The same label-name must be specified in the LABEL and GOTO statements to perform control transfer
Both GOTO and LABEL statements must be within the same program block (MAIN, FUNCTION or REPORT block)
The label-name must be followed by the column symbol (:) unlike the GOTO statement where the column symbol is optional.
WHENEVER ERROR GOTO first_error
...
LABEL first_error:
ERROR "Incorrect format"