On Wed, Aug 13, 2003 at 07:25:42PM -0500, [EMAIL PROTECTED] wrote:

> >It's also completely illegal. What good is converting an integer into a
> >pointer going to do you?

> Well, although completely illegal it works. Why would CodeWarrior allow
> me to perform such a haneous action if it was that bad.
> I'm asking not to be argumentative as I really do appreciate you
> responding, I'm just curious as a new programmer why something this
> simple could slip through?

A. It's C. C is perfectly happy letting you shoot yourself in the foot.
B. You're using casts. Even if C was less forgiving about foot-shooting,
   casts let you remove even that vestige of protection.

> I've been meaning to get a better understanding of pointers, I'm kinda
> running & gunning it, learning as I go... which I know would make some
> programmers cringe, especially on such a particular device in terms of
> memory. If you have a book in mind, that explains pointers extremely
> well, I'd love to hear it.

If you're going to program in C, you have to know pointers. Unfortunately, 
I don't know of any good books in that regards, because I cut my teeth
on pointers using an obscure language for the Atari 800 called
Action. It was so close to the metal that it makes C look like Visual
Basic. However, it did teach me what a pointer was, so when I started
learning C I already understood them.

I think if you ask on any C forum, they'll have lots of suggestions. It's
probably even in a FAQ somewhere.

-- 
Dave Carrigan
Seattle, WA, USA
[EMAIL PROTECTED] | http://www.rudedog.org/ | ICQ:161669680
UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-C++-DNS-PalmOS-PostgreSQL-MySQL

Dave is currently listening to Tom Robinson - Murder At The End Of The Day (Hope And 
Glory)

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to