Re: A very **very** basic question
- From: Keith Thompson <kst-u@xxxxxxx>
- Date: Thu, 25 Sep 2008 16:17:26 -0700
Richard<rgrdev@xxxxxxxxx> writes:
Peter Nilsson <airia@xxxxxxxxxxx> writes:
Richard<rgr...@xxxxxxxxx> wrote:
vipps...@xxxxxxxxx writes:
mdh wrote:
2) int i; i = 0 is not allowed because ?
a) even though my intention is to assign '0' to i ,
this can only occur within a function?
yes.
Wrong.
No, it isn't.
Wrong.
Whichever way you look at it i is set to the value 0. In programming
this is known as assignment. And I dont see any reason to confuse a
noob by saying any different.
Of course I am trying to use natural English and not be too clever for
my own good.
The C language distinguishes between "initialization" and
"assignment". I apparently have a higher opinion of mdh's
intelligence than you do; I don't think he'll have any trouble
understanding the distinction.
If you call them both "assignment", it just makes it more difficult to
explain why one is allowed outside functions and the other is not --
which is exactly what we're discussing in this thread.
We didn't just make up these terms for the fun of it, and they
certainly weren't invented with the intention of confusing people.
--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
.
- Follow-Ups:
- Re: A very **very** basic question
- From: mdh
- Re: A very **very** basic question
- References:
- A very **very** basic question
- From: mdh
- Re: A very **very** basic question
- From: vippstar
- Re: A very **very** basic question
- From: Richard
- Re: A very **very** basic question
- From: Peter Nilsson
- Re: A very **very** basic question
- From: Richard
- A very **very** basic question
- Prev by Date: Re: good c compiler
- Next by Date: Re: question
- Previous by thread: Re: A very **very** basic question
- Next by thread: Re: A very **very** basic question
- Index(es):
Relevant Pages
|