{{htmlmetatags>metatag-robots=()
metatag-title=(VARPTR | ugBASIC User Manual)
metatag-keywords=(ugBASIC,Commodore 64,Commodore PLUS/4,ZX Spectrum)
metatag-description=(Manual page for VARPTR)
metatag-media-og:image=(:ugbasic:logo-ugbasic-fb.png)
metatag-og:title=(VARPTR | ugBASIC User Manual)
metatag-og:description=(Manual page for VARPTR)
}}
====== ugBASIC User Manual ======
===== VARPTR =====
===== SYNTAX =====
= VARPTR(var)
==== PURPOSE ====
The ''VARPTR'' command (short for "variable pointer") is a pretty advanced statement
that lets you get the memory address of a variable. Essentially, it tells you "where"
in memory the value of a specific variable is stored.
In some advanced cases, you may want to directly manipulate the contents of memory.
This is useful for things like creating custom data structures or optimizing the
speed of execution of certain operations.
Directly manipulating memory can lead to program errors that are difficult to
detect and correct. If you are not completely sure what you are doing, it is
best to avoid using ''VARPTR''.
==== EXAMPLE ====
address = VARPTR(x)
==== ABBREVIATION ====
Vp
==== AVAILABLE ON ====
==== ANY PROBLEM? ====
If you have encountered a problem using this command, if you think there is a bug or the explanation is unclear, please [[https://github.com/spotlessmind1975/ugbasic/issues/new?title=ISSUE ON VARPTR|open an issue]] for this keyword on GitHub. Thank you!===== POWERED BY =====
[[:ugbasic:user:index|{{ :ugbasic:user:logo-ugbasic.png?nolink&600 |}}]]