Futurebasic/Language/Reference/inc
INC
[edit | edit source]Statement
[edit | edit source]Appearance Standard Console
Syntax
[edit | edit source]INC(intVar) intVar ++ numericVariable += IntegerValToAdd === Revised === May 30, 2000 (Release 3)
Description
[edit | edit source]This statement increments intVar by 1; that is, it adds 1 to the value in intVar, and stores the result back into intVar. intVar must be a (signed or unsigned) byte variable, short-integer variable or long-integer variable. If intVar is already at the maximum value for its variable type, then INC(intVar) will cycle it back to its minimum value. Example: INC(x&) and... x& ++ and... x& += 1 ...are equivalent to: x& = x& + 1 The following expressions are also equivalent. x& = x& + 100 x& += 100 Note: The += syntax may not be used for arrays of strings, containers, or records (though it may be used in the concatenation of simple strings or containers). Where arrays are involved, only numeric values may take advantage of this syntax. This syntax is valid for values other than 1.
See Also
[edit | edit source]DEC; INC LONG/WORD/BYTE; DEF CYCLE