Community QBasic

Rebooting the QBasic we all know and love!


Project maintained by Cory Smith

VARPTR$

Returns a string representation of a variable’s offset for use in the PLAY and DRAW statements.

Syntax

VARPTR$(string_variable)

Comments

string_variable is a string variable containing DRAW or PLAY commands.

QBasic does not guarantee that a variable will reside in the same memory location throughout the program execution. Use VARPTR$ immediately before any code that uses the address.

Example

scale$ = "CDEFGAB
PLAY "X" + VARPTR$(scale$)

See Also