Longptr
See Also: Declaring Variables, Variable Declaration Commands, Struct, AddressOf Function
Purpose
Declares one or more Longptr variables.
Syntax
To declare Longptr variables:
Longptr {identifier} […] {identifier}
Where:
- {identifier} is the name of a new Longptr variable.
- {identifier} may be between 1 and 4096 characters in length, must start with a letter, and may not contain spaces. Recommended characters are 0-9, a-z, A-Z, and _ (underscore).
To declare array variables of type Longptr:
Longptr {dimension-list} {identifier} […] {identifier}
Where:
- {dimension-list} is a list of one or more array dimensions for the array. A dimension list is declared using square brackets
[]. One pair of brackets is used to declare each dimension. If the array is static, then you must specify the static size of each dimension between each pair of brackets, e.g.,[{size}]. For more information about declaring arrays, refer to Array Variable Assignments. - {identifier} may be between 1 and 4096 characters in length, must start with a letter, and may not contain spaces. Recommended characters are 0-9, a-z, A-Z, and _ (underscore).
What It Does
Longptr is a memsize type: it is a 32-bit size integer in 32-bit compilation and a 64-bit size integer in 64-bit compilation.
This way, it can always hold a pointer value without being truncated and without needing to use a compiler switch. The single-character identifier for this type is “P”, while Integer is “I”. This makes the following a statement to set a constant to a value of type Longptr:
Define SOME_LARGE_VALUE for |CP$03762874671