This keyword has multiple meaning. If the identifier that follows this
command is not already defined, this can be used to give a label (name)
to a part of the program. This makes subprograms independent of their
position in the program and makes it easier for the programmer to keep
track of things (names are easier to assign to a purpose than line numbers).
The PROC
command is used to define the name of such a subprogram
(or jump target). Following the convention in other BASICs of the time,
such as Simon's BASIC or Tuned Simon's BASIC, the procedure name can also
contain spaces. In this case, the trailing space will not be considered as
part of the name.
If, instead, the identifier has been already used for a procedure, then this
command will call the procedure, as the instruction CALL
.
PROC name
Join BASIC 10Liner Contest with ugBASIC!
An interesting competition is held at the beginning of each year: the
BASIC 10Liner Contest.
It is possible to use ugBASIC to participate in the next
"BASIC10Liner" competition, in the following categories:
PROC ↔ Prb
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