Available on: all targets ✓ verified

defining labels

In ugBASIC it is possible to indicate the position within a program with the use of so-called "labels". The labels can be represented in the BASIC standard, i.e. with numeric labels, or with alphanumeric labels, and are used to jump within specific positions of the program.

SYNTAX

 number instruction
 label: instruction
 [label:] instruction


Legend
  • id : identifier
  • type : datatype
  • v : value
  • "..." : string
  • [...] : optional

EXAMPLE

 100 PRINT "oK!": GOTO 100
 begin: PRINT "OK!" : GOTO begin
 [begin:] PRINT "OK!" : GOTO begin


Used in:

Any problem?

If you have found a problem with this keyword, if you think there is a bug or, more simply, you would like it to be improved, open an issue for this example on GitHub.
Thank you!

open an issue BACK TO KEYWORDS