Home > lang > type > pointer 
 en fr de es it nl pl pt_BR mk sq ca hu cs tr ar fa id vi ko ja ru zh zh_TW eo
Previous  Next  Edit  Rename  Undo  Search  Administration  
Documentation  
Warning! This page is not translated.  See english version 
Pointer
DIM Var AS Pointer

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

In Gambas 3, Pointer is a true datatype, and you cannot replace them by integer numbers.

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