NAME

varptS - character form of variable pointer

SYNOPSIS

#include <basic/string.h>
#include <basic/type.h>
#include <basic/generic.h>

struct string varptS(type, generic)
int type;
union generic *generic;

DESCRIPTION

VarptS returns a three byte string which indicates the type and address of the variable given by type, generic (see generic(inc)).  The value of the first byte of the string indicates the type as follows:

            Value      Type
 
2Integer
3String
4Single precision
8Double precision

The other bytes give the offset into the current memory segment where the value of the variable is located: the value of the second byte is the low order byte of the offset; the third, the high order byte.  The current segment is set invisibly by this function.  An offset and seg(mach) together specify an address. 

This function implements the BASIC VARPTR$ function. 

SEE ALSO

string(inc), generic(inc), seg(mach)
varptr$(func)

WARNING

Operations involving absolute memory addresses ought not to be used. 

from The Basmark QuickBASIC Programmerís Manual by Lawrence Leinweber