Futurebasic/Language/Reference/dec

= DEC statement =

Statement
✔ Appearance ✔ Standard ✔ Console

Revised
May 30, 2000 (Release 3)

Description
This statement decrements  by 1 (or by  ); that is, it subtracts 1 from the value of , and stores the value back into. must be a (signed or unsigned) byte variable, short-integer variable or long-integer variable. If  is already at the minimum value for its variable type, then   will cycle it back to its maximum value. As of Release 3, FB supports the use of -= to decrease the value of a variable by a specified amount.

Example
and...

and...

...are all equivalent to:

The following expressions are also equivalent:

Note
The  syntax may not be used for arrays of strings, containers, or records where arrays are involved, only numeric values may take advantage of this syntax.