Re: decrement past beginning is valid?
From: Watson Davis (watson_at_watsonmusic.com)
Date: 11/17/04
- Next message: Francis Glassborow: "Re: Copying one text file to another"
- Previous message: Karl Heinz Buchegger: "Re: pointer misunderstanding?"
- In reply to: Ron House: "Re: decrement past beginning is valid?"
- Next in thread: Francis Glassborow: "Re: decrement past beginning is valid?"
- Reply: Francis Glassborow: "Re: decrement past beginning is valid?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 17 Nov 2004 09:23:13 GMT
Ron House <house@usq.edu.au> wrote in news:419ADDFF.7050805@usq.edu.au:
> Watson Davis wrote:
>
>> What I meant by legal is that a compiler will compile it.
>
> I've read the various to-and-fro posts in this thread, and I predict
> you will get a lot of unkind things said to you and you will not
> understand why.
Well, apparently, you hadn't finished reading the to and fro of the
thread. :)
I came to the realization that:
1) I wasn't using the same definitions for words that the rest of the
group was. That's pretty common in lots of areas besides just computer
languages. Since I wasn't being strict with my definitions of terms like
"legal", I was using the term incorrectly for the discussion. I haven't
been concerned with semantic niceties like that wrt computer science in a
long time so I've got to watch my tongue on groups like this.
2) I wuz rong. Just flat out worng. I had always assumed that since
arrays are passed into functions as pointers and that you can use
subscripts with pointers, that arrays WERE pointers and it was just a
case of 2 different types of notation for virtually the same thing (like
a union and just using two different pointers pointing to the same
location.) I had assumed that if you declare something as an array of
int, that you could then take that declaration and make pointer
assignments to it... like:
int somearray[10], *somepointer;
*somepointer = (int) malloc(100);
somearray = somepointer;
And you can't do that. I don't think I had ever tried to do that before
(at least, not in C or C++) and had just assumed it worked that way.
3) I also came to the realization that I've got some pretty big holes in
my knowledge base. When I went to school (back in the early '80s), my
university didn't even offer a C programming class and I had more
experience writing code than any of the instructors. (There were no
systems at my school that were running any flavor of Unix at that time.)
I started off as a BASIC and Assembler programmer, learned Pascal in
school, then moved on from there. After I graduated, I worked for a
fixed price consulting company where the owner fervently believed that
any programmer worth his/her salt could learn any language in 3 days. He
bid contracts based on that assumption. So we all learned a whole bunch
of different languages on different platforms in a big hurry.
Unfortunately, that's the way I learned C. So, my knowledge of C was/is
simply what I needed to know to code what I needed to code. And I've
been coding like that for the past 15 years.
I came to this newsgroup because I'm in the process of learning C++, just
for my own benefit, but it has really opened my eyes to a huge blind spot
of mine of which I was unaware. Fortunately (for me) and unfortunately
(for everyone else), I've never been very good at lurking; I've been a
regular on several non-technical newsgroups and a few mailing lists and
forums as well. So, if someone asks a question and I think I know the
answer (whether I do or not), I'll usually try to answer it if I have the
time. Unfortunately, in these C/C++ groups, that's turning out to be...
ummmm... opportunities for me to come face to face with my limitations.
:)
Watson (the pencil neck) Davis
- Next message: Francis Glassborow: "Re: Copying one text file to another"
- Previous message: Karl Heinz Buchegger: "Re: pointer misunderstanding?"
- In reply to: Ron House: "Re: decrement past beginning is valid?"
- Next in thread: Francis Glassborow: "Re: decrement past beginning is valid?"
- Reply: Francis Glassborow: "Re: decrement past beginning is valid?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|