06-22-2023, 11:45 PM
(This post was last modified: 06-22-2023, 11:47 PM by TerryRitchie.)
(06-22-2023, 01:44 PM)a740g Wrote: VARPTR$ can come in handy when using DRAW or PLAY inside tight loops where you want to avoid the overhead and speed penalty of say string concatenation or other string ops.That's a valid point I should have addressed. When using STR$() more concatenation then comes into play slowing things down considerably.
Like in the example below, we avoid a string concatenation inside the FOR loop by using VARPTR$ for DRAW. This still works in QB64, thanks to the length Galleon went to emulate such things.
This is probably the only reason I'd use VARPTR$. Else, it is better to avoid such legacy commands.