Table of Contents

ugBASIC User Manual

PROC ✓

SYNTAX

   PROC name

PURPOSE

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 pat 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). The name may consist of several words separated by spaces. A leading space is not significant. Other BASIC commands may be in the same line as PROC.

If, instead, the identifier has been already used for a procedure, then this command will call the procedure, as the instruction CALL.

EXAMPLE

  PROC factorial

See also the following example files:

ABBREVIATION

 Prb

AVAILABLE ON

ANY PROBLEM?

If you have encountered a problem using this command, if you think there is a bug or the explanation is unclear, please open an issue for this keyword on GitHub. Thank you!

POWERED BY