64
Format:
<x> = VARPTR(<variable>)
<variable> is a number, string, or array variable.
Example:
B = VARPTR (A)
Remarks:
The VARPTR function returns the address of the first byte of data identified with
the variable. A value must be assigned to the variable prior to the call to VARPTR
or an error will result. Any type variable name may be used (numeric, string,
array).
Note that all simple variables should be assigned before calling VARPTR for an
array because addresses of arrays change whenever a new simple variable is
assigned.
VARPTR is used to obtain the address of a variable or array so that it may be
passed to an assembly language subroutine. A function call of the form
VARPTR(A(0)) is specified when passing an array, so that the lowest addressed
element of the array is returned.
The following figure illustrates the relationship between the variable type and the
address indicated by VARPTR.
Integer Type
0010
Variable name length -1
Variable name
Higher 8 bits
Lower 8 bits
←
Address
≈
Character Type
0011
Variable name length -1
Variable name
←
Address
≈
≈
Storage address of variable (MSB)
Storage address of variable (LSB)
Length of character string
Single-precision, Real Number Type
0100
Variable name length -1
Variable name
←
Address
Double-precision, Real Number Type
1000
Variable name length -1
Variable name
←
Address
≈
≈
≈
≈
Sign and higher 7 bits of mantissa
Exponent
Exponent
Sign and higher 7 bits of mantissa
Middle 8 bits of mantissa
Lower 8 bits of mantissa
Lower 8 bits of mantissa
≈
Commands, Statements, and Functions
Summary of Contents for C500-ASC04
Page 1: ...C500 ASC04 ASCII Unit Operation Manual Revised February 2001 ...
Page 5: ...iv ...
Page 7: ...vi ...