06-22-2023, 11:57 AM
(This post was last modified: 06-22-2023, 11:46 PM by TerryRitchie.)
VARPTR (VARiable PoinTeR) is used to locate the address offset of a variable within a 16bit block of code.
VARPTR$ does the same thing but returns a string of the variable's value located at that address. Just like using STR$() on a numerical variable.
It's not useful for variables that are already strings as you have found out. Both commands are a throwback from the 16bit era of coding and are no longer useful in QB64 except to support legacy source code that uses them.
In all the years coding I don't believe I ever used VARPTR$ when dealing with DRAW. I simply converted numerical values using STR$().
VARPTR$ does the same thing but returns a string of the variable's value located at that address. Just like using STR$() on a numerical variable.
It's not useful for variables that are already strings as you have found out. Both commands are a throwback from the 16bit era of coding and are no longer useful in QB64 except to support legacy source code that uses them.
In all the years coding I don't believe I ever used VARPTR$ when dealing with DRAW. I simply converted numerical values using STR$().