Futurebasic/Language/Reference/dec long
Appearance
DEC LONG/WORD/BYTE statements
[edit | edit source]DEC LONG/WORD/BYTE
[edit | edit source]Statements
[edit | edit source]✔ Appearance ✔ Standard ✔ Console
Syntax
[edit | edit source]DEC {LONG|WORD|BYTE} (addr&)
Description
[edit | edit source]This statement decrements the long integer, short integer or byte which begins at the specified address in memory; that is, it subtracts 1 from the value in memory and stores the result back into the addressed location. If the long integer, short integer or byte is already at its minimum possible value, then the statement will cycle it back to its maximum value.
Example
[edit | edit source]DEC LONG (myAddr&)
...is equivalent to:
POKE LONG myAddr&, PEEK LONG(myAddr&) - 1
Also:
DEC WORD (myAddr&)
...is equivalent to:
POKE WORD myAddr&, PEEK WORD(myAddr&) - 1
See Also
[edit | edit source]DEC; INC; INC LONG/WORD/BYTE