F
I think you should get the distinction between zero and null clear, and
learn not to invoke undefined behaviour, before you start teaching
others about pointers.
Where do I invoke undefined behavior, besides the part marked
/* ERROR!! */??
Where do I invoke undefined behavior, besides the part marked /* ERROR!! */??
The issue I was mainly referring to has come up so bloody often on this
newsgroup, that if you'd ever read it for comprehension you'd have know
_exactly_ what I was talking about. Since I don't think that someone
incompetent should be teaching others on the use of pointers (because
it's too bloody dangerous),
Foobarius said:Then you'd better get working, going around to all those universities
and colleges where the CS professors confuse arrays and
pointers...their infractions are far worse. (And there's plenty of
them.)
Dangerous? Is somebody going to lose a leg?
Arthur J. O'Dwyer said:The second example on the page, which is also the place you confuse
"zero" and "null." And again in the fourth example. Maybe some
other places; I just skimmed to find the things Richard must have been
referring to.
I did fix the NULL bit; yes that was pretty bad.
But I can't help but take offense when I come to an NG, not wanting to
cause trouble, and I get a completely uncalled-for brow-beating from
someone, who in this case is one Mr. Vos.
How would you know that, not having even graduated high school yet?Then you'd better get working, going around to all those universities
and colleges where the CS professors confuse arrays and
pointers...their infractions are far worse. (And there's plenty of
them.)
It could be far worse than that. I worked for twenty years in anDangerous? Is somebody going to lose a leg?
Foobarius Frobinium said:(e-mail address removed) (Richard Bos) wrote in message
Then you'd better get working, going around to all those universities
and colleges where the CS professors confuse arrays and
pointers...their infractions are far worse. (And there's plenty of
them.)
Dangerous? Is somebody going to lose a leg?
Foobarius said:Then you'd better get working, going around to all those universities
and colleges where the CS professors confuse arrays and
pointers...their infractions are far worse. (And there's plenty of
them.)
Dangerous? Is somebody going to lose a leg?
I did fix the NULL bit; yes that was pretty bad.
NULL is defined by your C compiler as a pointer to nothing;
usually it is (void *) 0. (The void pointer is explained below.)
Usually, NULL is a void pointer to address 0, but, it's best to
use the NULL definition, just to be safe and for clarity.
Alan Balmer said:How would you know that, not having even graduated high school yet?
It could be far worse than that. I worked for twenty years in an
industry where a program's undefined behavior can (and sometimes does)
kill people.
Alan Balmer said:The above remarks by Mr. Bos hardly qualify as browbeating.
You
present yourself as someone qualified to teach others about pointers,
and must expect that folks in this group won't let you get away with
inaccuracies.
Michael Mair said:And why exactly do you want to be counted among the ranks of
the incompetent and dangerously stupid?
Learn from Richard's comments, mend your ways and the misinformation
you spread.
I see a certain danger in having the least qualified candidates teach
the next generations.
The saying goes: don't look down on someone unless you are helping
them up. (usually attributed to MLK Jr.)
If you aren't going to help
someone up, don't complain about their alleged incompetence (see
elsewhere in the thread).
Well, then, for safety's sake, we'd better get moving! For the sake of
curiousity, what languages does an embedded device usually use? (I
usually hear of a small Scheme dialect, C, or ugh...Java)
Foobarius said:I did. As said, I will take even rude criticisms into account. Read
the guide again: :s/0/NULL/g, plus a little explanation of what the
NULL macro is for.
Read the bottom of this:
http://vergil.chemistry.gatech.edu/resources/programming/c-tutorial/arrays.html
Are you sure the term '**least** qualified' applies to me? I'm not
going to suggest that I am the absolute best, but I think it's fair to
say I fall somewhere into the middle. And that's a COLLEGE programming
course.
<snip>
The reason I submitted the guide for review was because I wanted it to
be accurate. I knew full well, this being Usenet after all, someone
would go a little too far. But I /do/ care, and I /do/ listen, in
spite of anything else.
It is a pointer that doesn't point anywhere. There is no 'nothing'
that it points to.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.