IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
Coder
Search Coder Group:

Advanced
-Collapse +Expand Coder Study Test
PRESTWOODCERTIFIED
-Collapse +Expand Coder Store
PRESTWOODSTORE

Prestwood eMagazine

October Edition
Subscribe now! It's Free!
Enter your email:

   ► KBRole-Based T...Coding & OOGeneral Codi...   Print This     
  From the May 2010 Issue of Prestwood eMag
 
Coder General Coding Concepts:
Pointers / References
 
Posted 15 years ago on 2/14/2009
Take Away:

A pointer is a variable type that allows you to refer indirectly to another object. Instead of holding data, a pointer holds the address to data -- the address of another variable or object. You can change the address value a pointer points to thus changing the variable or object the pointer is pointing to.

A reference is a type of pointer that cannot change and it must always point to a valid storage (no nulls).

Coder Definition Flashcard:
 A flashcard from our Coder Flashcards Library
 A definition from our Coder Definitions Page

KB101915

Pointers / References -

A pointer is a variable type that allows you to refer indirectly to another object. Instead of holding data, a pointer holds the address to data -- the address of another variable or object. You can change the address value a pointer points to thus changing the variable or object the pointer is pointing to.

A reference is a type of pointer that cannot change and it must always point to a valid storage (no nulls).


Implicit Pointer Usage

Pointers are a fundamental part of all languages even if a language doesn't support using developer defined pointer data types. For example, strings and object instances are just pointers. Event handlers such as a button click or open are actually a pointer to a method. 

Developer Defined Pointers

Everything used in an application is stored somewhere in computer memory and a pointer holds the address of those things. When a computer language allows you to use developer defined pointers, it allows you to set, or reset, the address a pointer is pointing to. Pointers allow you to directly work with computer memory which is both powerful and scary.

More Info

Code:  C# Pointers
Code:  C++ Pointers
Code:  Delphi Pointers
Code:  Delphi Prism Pointers
Code:  ObjectPAL Pointers
Code:  VB.Net Pointers (None)

Comments

0 Comments.
Share a thought or comment...
 
Write a Comment...
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P161A1
Enter key:
Definition Contributed By Mike Prestwood:

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains play-drums.com and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Visit Profile

 KB Article #101915 Counter
15438
Since 2/14/2009
Sales Website: www.prestwood.com Or visit our legacy sales site: 
legacy.prestwood.com


©1995-2024 Prestwood IT Solutions.   [Security & Privacy]