Pointer
DIM Var AS Pointer

This native datatype represents a pointer, i.e. an address in memory.

This is an absolute synonymous of the Integer datatype on 32 bits systems.

In the 64-bits version of Gambas, a Pointer is a synonymous for the Long datatype.

Example

This example puts the (hex) representation of a Single number into a f. See Single Precision

DIM i AS Integer ' 4 bytes
DIM f AS Single  ' 4 bytes
DIM hH AS Pointer ' Needs to be allocated

i = &h3EAAAAAA& 'IEEE representation of 1/3

hH = Alloc(4)
WRITE #hH, i
READ #hH, f
Free(hH)

See also

Datatypes, Alloc