Skip to content

Pointer Type

Pointers can be used to declare variables for storing the memory address of a variable.

You can assign a value to a pointer variable with the AddressOf function. This command retrieves the memory address of a named variable and returns it to the pointer variable.

String sName
Pointer lpNameVar
Move 'John' to sName
Move (AddressOf(sName)) to lpNameVar

The above example first declares a string variable. Next, a value is assigned to the string, which allocates memory to the string. Finally, the memory address of the string is stored in the pointer variable lpNameVar.

Notes: - A variable's address is not allocated until a value is first assigned to it. - When string variables grow in size, their address in memory may change.

Range

  • 32-bit: 0 to 4,294,967,295
  • 64-bit: 0 to 18,446,744,073,709,551,615

Note

For more information, refer to the Declaring Variables and the Pointer command.