I.T. Discussion Community!
-Collapse +Expand
Coder
Search Coder Group:

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

Prestwood eMagazine

May 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 11 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 = P1296A1
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
12996
Since 2/14/2009

Follow PrestwoodBoards on: 


©1995-2020 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech