FutureBasic Logo

<<    Index    >> FutureBasic 5

dec long/word/byte   statement



Syntax:
dec {long|word|byte} (addr&)

Description:
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:
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:
dec; inc; inc long/word/byte