|
|
In article <3df2361b@news.povray.org> , "Tony[B]" <ben### [at] catholicorg>
wrote:
>> BTW, gotos are fine, they are just a bit harder to read in their "natural"
>> form. However, you use them all the time - in form of the switch-case
>> statement.
>
> Interesting. And would if-else statements not do that too?
No, a "case" is always a goto with exactly the same abilities as a "natural"
goto! You may for example write the following perfectly legal code:
int i = 4;
switch(2)
{
case 1:
i = 7;
while(i < 6)
{
if(i != 4)
{
case 2:
i++;
}
}
printf("%d", i);
}
Guess what this prints...
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|