POV-Ray : Newsgroups : povray.off-topic : Random C craziness : Re: Random C craziness Server Time
7 Sep 2024 11:22:29 EDT (-0400)
  Re: Random C craziness  
From: Invisible
Date: 25 Jul 2008 09:21:50
Message: <4889d36e$1@news.povray.org>
>>>   Except that C does have goto.
> 
>> Ooo, really?
> 
>> In that case, I have *no clue* why they did it this way...
> 
>   Because "while(1)" is a common idiom, and avoids the ugly goto.
> 
>> Oh, wait, maybe I do... Can you use GOTO to jump to a *pointer*? Or only 
>> a literal label?
> 
>   Jumping to a pointer is normally called "function call".
> 
>   Goto works only with labels.

Yes, but jumping to a function pushes a return address onto the stack. 
And they specifically don't want to do that. (Because it would use an 
unbounded amount of stack.)

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.