That's a good point you just made about Delphi actually making it
harder to first understand pointers.  As it turned out this WAS my exact
problem!  Delphi is so good at hiding the internal actions going on beneath
the hood that when working thru things backwards as I did, its all the
tougher to get your head wrapped around such things.  I would have much
preferred to have worked it all out the other way, and that's precisely why
I'm trying to up my knowledge of all basic comp sci.  
        I don't know that I particularly like that analogy though.  I
certainly wouldn't confuse myself or anyone else by using pointers to do
integer math! <g>  Their name really says it all and tells you what pointers
are meant for so there's no reason to need analogies or other head tricks.
I must confess though that as I began using them more and more I tended to
think of them more as untyped variables than anything else.  That would
probably seem ludicrous to you, but that's just the way my head works I
guess.  In any case thanx to you for pushing me over the edge of that small
cliff! 

from Robert Meek dba Tangentals Design  CCopyright 2006

"When I examine myself and my methods of thought, I come to the conclusion
that the gift of Fantasy has meant more to me then my talent for absorbing
positive knowledge!"
                                                    Albert Einstein


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Jim Burns
Sent: Thursday, March 09, 2006 7:29 PM
To: 'Delphi-Talk Discussion List'
Subject: RE: About pointers, school, and other little details...


> Burns finally pushed me into the sordid world of 
> pointers.  I had
> taken careful steps for a long time not to need to go there 
> but he left me no choice...

Wow.  I'm glad to hear it, I think.  Keep pushing forward.

You know I just thought of a good analogy for pointers.  First off, you
should understand they are just integers, just like any other integer,
they're just numbers.  They're unsigned, so the smallest value they can hold
is 0 and the largest is 2^32-1.  And this is why the size of the pointer
effects the "address space" to which you have access. 

Nothing magic, but they are /used/ a bit special as numbers go.  If you
typecast them, and the only reason you /have/ to do this in Delphi is
because of its strong-typechecking, you can even use them for math, they're
numbers.  But when used for what they are, their value is interpreted as a
memory address through which you can look at the /other/ value at that
address.  Think about it, that's not difficult.  In fact, it's made all the
more difficult by Delphi!  

The analogy?  A windows shortcut.  It IS a file... in fact that's ALL it IS.
But it is treated special in that it contains information that when
/interpreted/ "points" us to another file.  Voila', a pointer.




Jim


------------------------------------------------------------------------
 Jim Burns, <mailto:[EMAIL PROTECTED]>
   Technology Dynamics
   Pearland, Texas  USA 
   281 485-0410 / 281 813-6939

__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi-talk

__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi-talk

Reply via email to