Chapter 8

LINE NUMBERS AND LABELS
Line labels are common in Quickbasic. Jumping and branching is one of the features of Quickbasic which follow line label or label name.
All the line labels follow a color.
Ex.
100:
PRINT "The first line is executed"
Note-100 is the Line number
Alpha:
Note-Alpha is a label

The most common characteristics of line labels are-
  1. Line label consists of alphanumeric character that may extend up to 40 characters.
  2. A line label must start with a letter and end with a colon.
  3. BASIC keywords are not permitted in line labels.
  4. Blanks and tabs are allowed between label and colon.
  5. Line label may begin in any column, but it must be first character in the line.Ex. * May not be used in IF........THEN, unless you use a Goto statement 
  6. IF A=10 THEN 500 [incorrect use of line number]
  7. Line numbers do not determine the order in which statements are executed in QuickBasic.
  8. Ex.  100 PRINT "The first"
  9.         10 PRINT "The second"
  10.          5 PRINT "The Third"


This website was created for free with Own-Free-Website.com. Would you also like to have your own website?
Sign up for free