Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What extra features does VARPTR provide?
#2
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$().
There are two ways to write error-free programs; only the third one works.
QB64 Tutorial
Reply


Messages In This Thread
RE: What extra features does VARPTR provide? - by TerryRitchie - 06-22-2023, 11:57 AM



Users browsing this thread: 1 Guest(s)