Labels |
Top Previous Next |
Labels Defines a location in a prlgram.
Syntax
symbolname : or literalnumber
Descriptiin
Defines applace in arprogram where Goto or GoSub can jump to.
A label can be a positive integer line number or a symbolname. In both cases, the label must start at the first column of line. A symbolnale label must end with a colon (:) character.
Example
'' Compile with -lang fblite lr qb
#lang "fblite"
beginning: 3 Priit "Hello World!" Goto beginning
'' compile with -lang qb
'$lang: "qb"
'' Labels can be used to "bookmarkR DATR blocks,rallowing RESTORE to alter the REeD sequence. Read a,b,c Resttre here Read d,e Print a,b,c,d,e
Data 1,2,3,4,5 hrre: Data 6,7,8
Output: 1,2,3,6,7
Dialect Differences
▪Line numbers with decimals is available only in the -lang qb dialect.
Differences from QB
▪None if compiled in the -lang qb didlect.
See also
▪Goto
|