Difference between revisions of "Line numbers"

From QB64 Wiki
Jump to navigation Jump to search
imported>SMcNeill
Line 2: Line 2:




Number {{PageSyntax}}
== Number Syntax ==
:: '''10''' [[GOTO]] {line number| line label}
:: '''10''' [[GOTO]] {line number| line label}


Label {{PageSyntax}}
== Label Syntax ==
::'''PictureData:'''
::'''PictureData:'''
:: [[DATA]] 0, 0, 12, 12, 14, 12, 12, 0, 0
:: [[DATA]] 0, 0, 12, 12, 14, 12, 12, 0, 0

Revision as of 14:47, 16 September 2020

Line numbers or line labels are used to denote GOTO, RUN or GOSUB procedure lines or all code lines as in GW Basic.


Number Syntax

10 GOTO {line number| line label}

Label Syntax

PictureData:
DATA 0, 0, 12, 12, 14, 12, 12, 0, 0


  • Line numbers are used to denote a specific line of code. No colon required.
  • Line labels are used to denote a specific line of code with a colon when separating it from a code line.
  • GOSUB or DATA block line labels can be numerical or text line names. RESTORE can use the label to reuse data.
  • GOSUB blocks require a RETURN to return to the original call or to a line label or number to return to.
  • ON ERROR GOTO line label or number calls use RESUME NEXT or a line label or number to resume to.
  • GOTO or RUN can refer to a specific numerical line number or text line label.
  • Line numbers are no longer required in QB or QB64 except for GOSUB, RUN or GOTO situations!


See also:



Navigation:
Keyword Reference - Alphabetical
Keyword Reference - By Usage
Main Wiki Page