Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Pointer (computer programming)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===BASIC=== Several old versions of [[BASIC]] for the Windows platform had support for STRPTR() to return the address of a string, and for VARPTR() to return the address of a variable. Visual Basic 5 also had support for OBJPTR() to return the address of an object interface, and for an ADDRESSOF operator to return the address of a function. The types of all of these are integers, but their values are equivalent to those held by pointer types. Newer dialects of [[BASIC]], such as [[FreeBASIC]] or [[BlitzMax]], have exhaustive pointer implementations, however. In FreeBASIC, arithmetic on <code>ANY</code> pointers (equivalent to C's <code>void*</code>) are treated as though the <code>ANY</code> pointer was a byte width. <code>ANY</code> pointers cannot be dereferenced, as in C. Also, casting between <code>ANY</code> and any other type's pointers will not generate any warnings. <syntaxhighlight lang="BlitzMax"> dim as integer f = 257 dim as any ptr g = @f dim as integer ptr i = g assert(*i = 257) assert( (g + 4) = (@f + 1) ) </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)