.variable  

Definition:

Sets a callable label within your program.

Parameter Description:


variable = any valid existing label variable

Command Description:

A label is like a callable bookmark within your program. It basically tells Blitz where to start something; either program execution (through a Goto or Gosub command) or where to start reading Data (through the Read command). While most 'professional' programmers loathe and hate the use of 'branching' commands like Goto/Gosub, you will likely find it useful regardless. Use Return to jump back to the original code that called the label via the Gosub command (you cannot Return from a Goto command).
In addition, you MUST use labels to read Data values using the Read command. Check out the Read command for use of it in a Data statement environment.

Example:

; The program starts here, but we'll branch to other labels

Gosub start
Gosub label3
Gosub label2

; Let's wait for ESC to be pressed before ending
While Not KeyHit(1)
Wend
End

.start
Print "We start here ..."
Return

.label2
Print "This is label 2"
Return

.label3
Print "This is label 3"
Return

Index