GLBasic User Manual

Main sections

INC

INC x## [, num#$=1]
INC x$$ [, num#$]


Increases the value of the variable x## or x$$ by the amount num#$. This command can be used directly on values in arrays (see the example below).

a = 100
DIM b[5]
b[3] = 200
INC a, 5
INC b[3], 5
PRINT a, 100, 100
PRINT b[3], 100, 120
SHOWSCREEN
MOUSEWAIT


Output:
105
205

See also...

DEC