'''VARPTR$''' is a memory function that returns a [[STRING]] representation of a variable's memory address value for use in a [[DRAW]] or [[PLAY]] statement.
{{PageSyntax}}
:: string_value$ = VARPTR$(''variable'')
* Can use any [[STRING|string]] or numerical variable reference '''existing''' in memory.
* If the parameter value is from an array it must be dimensioned already. Cannot use fixed length string arrays.
* When using '''numerical''' ''variable'' values in [[DRAW]] strings, use an = sign after the function letter. "TA=" + VARPTR$(''variable%'')
* Always use variable X as in "X" + VARPTR$(''string_variable$'') to [[DRAW]] or [[PLAY]] another [[STRING]] value.
* DRAW relative Moves use a + or - before the equal sign. EX: DRAW "M+=" + VARPTR$(x%) + ",-=" + VARPTR$(y%)
''Example 1:'' How VARPTR$ reads consecutive values from memory.
{{CodeStart}}
{{Cl|SCREEN (statement)|SCREEN}} 2
{{Cl|CLS}}
WIND$ = "r10 d7 l10 u7 br20" 'create draw string to be read by function
{{Cl|DRAW}} "TA=" + {{Cl|VARPTR$}}(degree) + "U90" 'erase previous second hand draw
{{Cl|LOOP}}
{{CodeEnd}}
:''Explanation:'' When the VARPTR$ value is used in DRAW, '''=''' MUST be used to pass the value to the draw! Negative Turn Angle values move clockwise and each second moves the hand 6 degrees. '''TA''' uses actual degree angles starting at 0 or noon.
''Example 3:'' Comparing DRAW moves using VARPTR$ and [[STR$]] values.