Richard Heathfield wrote:
> CBFalconer said:
>> Richard Heathfield wrote:
>>> CBFalconer said:
>>>> MisterE wrote:
>>>>>
>>>>>> if (1 == 1) a = 1;
>>>>>
>>>>> The semicolon brings the if to an end.
>>>>
>>>> In Pascal. Not in C. In C the definitive thing is the presence of
>>>> a following 'else'.
>>>
> <snip>
>
>>> if(1 == 1)
>>> a = 1;
>>> printf("Hmmm\n");
>>> else
>>> NULL;
>>> return 0;
>>> }
>>
>> That has a following printf, not a following else.
>
> Er, that else sure looks like a following else to me.
> Here's another counter-example:
>
> int main(void)
> {
> if(1 == 1)
> return 0;
> }
>
> According to you, that 'if' has no end (because there is no following
> 'else' present).
I said 'definitive thing', not 'end'. And was talking about the
presence/absence of the following 'else'. I don't think I have
been sloppy this time. Also don't count line endings as
significant in either language. They're all white space.
--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
--
Posted via a free Usenet account from
http://www.teranews.com