FutureBasic Logo

<<    Index    >> FutureBasic

peek   function

byte byteValue = peek [byte](address)
short shortValue = peek word(address)
int intValue = peek int(address)
long longValue = peek long(address)

Shorthand syntax:
byte byteValue = |address|
short shortIntValue = {address}
long longValue = [address]

The peek functions look at the 1, 2, 4 or 8 bytes of data which begin at address, and return them as a byte, short, int 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