Specifications
Commands - 53
INC and INCF
Statements
SYNTAX: INC variable
INCF variable
PURPOSE: To increment a variable by one (INC) or four (INCF).
REMARKS: This is a fast increment of a simple or array variable.
A=A+1 slow
INC A fast
A=A+4 slow
INCF A fast
INC executes more than double the speed of the statement it replaces. Valid for simple and array
variables.
RELATED: DEC, DECF
EXAMPLE: 10 PRINT H
20 INC H
30 PRINT H
40 INCF H
50 PRINT H
RUN
0
1
5
Line 10 increments element 8 of the array A.
10 INC A(8)
ERROR: <Expected variable> – if parameter is not a variable