Declaration and Statement Labels

Top  Previous  Next

The language statements in a source module can be divided into two general categories: data declarations and executable statements, or simply "data" and "code."

During program execution, data declarations reserve memory storage areas that are manipulated by executable statements. A label is required for the data to be referenced in executable code. All variables, data structures, PROCEDUREs, and ROUTINEs are referenced by labels.

A label defines a specific location in a PROGRAM. Any code statement may be identified and referenced by a label. This allows it to be used as the target of a GOTO statement. Each label on an executable statement adds ten bytes to the executable code size, even if not referenced.

The label on a PROCEDURE statement is the procedure's name. Using the label of a PROCEDURE in an executable statement executes the procedure, or in expressions, or parameter lists of other procedures, assigns the value returned by the procedure.

The rules for valid Clarion labels are:

·

A label MUST begin in column one (1) of the source code.

·

A label may contain letters (upper or lower case), numerals 0 through 9, the underscore character (_), and colon (:).

·

The first character must be a letter or the underscore character.

·

Labels are not case sensitive (i.e. CurRent and CURRENT are the same).

·

A label may not be a reserved word.

·

A period (.) is valid in a label for procedures defined in a CLASS structure in the form ClassLabel.MethodLabel