Address

Obsolete

The Address data type is obsolete. Use Pointer instead.

 

 

See Also: Declaring Variables, Variable Declaration Commands, Struct, Alloc, Realloc

Purpose

Declares one or more Address variables.

Syntax

To declare Address variables

Address {identifier} […{identifier}]

Where

To declare array variables of type Address

Address{dimension-list} {identifier} […{identifier}]

Where

What It Does

The Address command declares a variable to hold a memory address.

Multiple variables may be declared on one command line, with their names separated from each other by spaces.

Examples

Function AllocateBlock Returns Address

    Address aMyVar

 

    Move (alloc(1024)) To aMyVar  // allocate a memory block

    Function_Return aMyVar

End_Function

This example declares a variable named aMyVar of type address and initializes it.

 

Address[] aMemoryLocations

This example declares 1 dynamic array variable, named aMemoryLocations, containing an undefined number of elements of type Address.

Address[5] aMemoryLocations

This example declares 1 static array variable, named aMemoryLocations, containing 5 elements of type Address.

Address[][3] aMemoryLocations

This example creates a two-dimensional dynamic array variable named aMemoryLocations, containing an undefined number of elements of type Address. Conceptually, this represents a rectangular array with an undefined number of rows, each of 3 columns.

You can declare dynamic multi-dimensional arrays where all dimensions are dynamic; these are called jagged arrays.

 

Notes