Line Label

From BR Wiki
Jump to navigation Jump to search

There are two line label pages:

For Programs

The Line label is an optional name for a program line. They are accepted at the beginning of all statements following the line number. The label may be from one to 30 alphabetic, numeric or underscore characters in length, but must begin with a letter. Each line label must be unique and immediately followed by a colon. Business Rules allows most statement and command keywords to be used as line labels. In the following statement, "LABEL_SAMPLE:" is a line label:

00900 LABEL_SAMPLE: Rinput #1, Select '2,40,Cr 10,[w]',Attr "[A]": Autoselect$

A line label can then subsequently be used in place of a line number to reference the line from a secondary expression. In the following example, the line label BIG is defined to represent line 120; it is then used as a line reference for the GOTO statement in line 300. (F1 is also a line label):

00120 BIG: Print Using F1: A$,T(5)
o
o
o
00300 GOTO BIG

Line labels are often used to easily refer to form statements:

1100 read #10,using Addressform: Mat Co$,City$,St$,Zc$,Mat Dd$
1110 Addressform: form 3*C 30,C 20,C 2,C 12,Pos 257,10*C 18

For information about the labels that are used in procedures, see Line Label (procedure).


For Procedures

Commands in a procedure file may start with a line label. The label must begin with a colon (:) and may be up to 800 alphabetic, numeric or underscore characters in length (spaces are not allowed). Procedure labels do not have to be followed by a command. Both the following procedure lines are acceptable:

:NEXTRUN
:START PROC MENU

When typed in without a line number and during READY mode, most statements can be executed immediately. Statements without line numbers or labels may also be included in procedure files. Statements used in both these ways may include a comment at the end of the statement.

The comment must be separated from the rest of the statement by at least one space and an exclamation point, or it may be set off with the use of the REM statement.

The following example shows the OPEN (Ope) statement being used in immediate mode:

OPEN #1:"name=test1",Internal,Input,Sequential