| delorie.com/archives/browse.cgi | search |
Endlisnis wrote:
> But, in C, if you try:
>
> if(expr) {
> func();
> func();
> }; /* <--- */
> else
> func();
>
> You will get a parse error.
Actually, I know that. :)
Pascal syntax doesnt have any semicolons between IF and ELSE:
IF something THEN operator1 ELSE operator2;
Both operators may be either simple or composite. Semicolon is not needed here.
In C we have different situation:
if (something) operator1; else operator2;
and
if (something) {
do_something();
} else operator2;
I dislike this. :((
bye.
Alexei A. Frounze
-----------------------------------------
Homepage: http://alexfru.chat.ru
Mirror: http://members.xoom.com/alexfru
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |