VARPTR

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Core Language > BuiltIn Functions > Memory handling and pointers >

VARPTR

 

Description

 

Returns the address of the memory block used by a variable.

 

Syntax

 

ptr = VARPTR(VariableName)

 

Returns

 

Number

 

Parameters

 

Name

Type

Optional

Meaning

VariableName

Variable

No

Name of the variable you want the address.

 

Remarks

 

VariableName can also be an UDT structure or elements inside UDT at any nesting level.

 

Restrictions

 

Attention: for dynamic ASCIIZ strings VARPTR will return the data address and not the pointer to data address.

 

See also

 

STRPTR, VARPTR, POKE$, POKE, PEEK$, PEEK

 

Examples