* AddressOf Operator

Purpose

Used to obtain the memory/descriptor address of a variable.

Syntax

% = *var

var: variable

Description

The * operator is used as the address-of operator like V: (and VarPtr) and ArrPtr.

For variable-length strings and arrays * returns the address of the descriptor and behaves as ArrPtr(). For all other variables the * operator returns the memory address of data contained in that variable.

For a fixed string * returns the first four bytes of the data. This function has no meaning for a fixed-string.

Example

OpenW 1

Global x%, y$

Print *x%

KeyGet y$  // Press a key to end

CloseW 1

Remarks

The * operator is synonym to ArrPtr for strings and arrays, and VarPtr() and V: for other variables, fixed strings excluded.

See Also

ArrPtr, Varptr, V:

{Created by Sjouke Hamstra; Last updated: 17/09/2014 by James Gaite}