Futurebasic/Language/Reference/inc long

From Wikibooks, open books for an open world
Jump to navigation Jump to search

INC LONG/WORD/BYTE[edit | edit source]

Statements[edit | edit source]

Appearance Standard Console

Syntax[edit | edit source]

INC {LONG|WORD|BYTE} (addr&) Description: This statement increments the long integer, short integer or byte which begins at the specified address in memory; that is, it adds 1 to 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 maximum possible value, then the statement will cycle it back to its minimum value. Example: INC LONG (myAddr&) ...is equivalent to: POKE LONG myAddr&, PEEK LONG(myAddr&) + 1 Also: INC WORD (myAddr&) ...is equivalent to: POKE WORD myAddr&, PEEK WORD(myAddr&) + 1

See Also[edit | edit source]

INC; DEC LONG/WORD/BYTE; DEF CYCLE