FutureBasic Logo

<<    Index    >> FutureBasic 5

peek   function



Syntax:
byteValue` = peek [Byte](address&)
shortIntValue% = peek Word(address&)
longValue& = peek Long(address&)


Shorthand syntax:
byteValue` = |address&|
shortIntValue% = {address&}
longValue& = [address&]


Description:
The peek functions look at the 1, 2 or 4 bytes of data which begin at address&, and return them as a byte integer, short integer or long integer value, respectively. The address& should be a long integer expression, or a Pointer or Handle variable. The value returned by a peek function will be interpreted either as a signed or unsigned value, depending on what type of variable it's assigned to. If the value is not assigned to any variable, it's usually interpreted as a signed value.

See Also:
Poke; varptr