POV-Ray : Newsgroups : povray.off-topic : Random C craziness : Re: Random C craziness Server Time
7 Sep 2024 05:10:33 EDT (-0400)
  Re: Random C craziness  
From: Chris Cason
Date: 25 Jul 2008 04:48:00
Message: <48899340$1@news.povray.org>
Invisible wrote:
> So cont points to a zero-argument function that returns a zero-argument 
> function? And this loop just calls it repeatedly?

Assuming TRUE is a value that always returns non-zero, yes. The code itself
appears to implement a state machine.

Of course, this being C, 'TRUE' could be a macro that expands to a function
 that returns a value and thus the loop need not be infinite. It could even
expand to a variable with a decrement or increment operator. Or really
anything - if the code were presented to someone as part of an computer
science exam, for example, they would probably be expected to pick that
possibility up. In the real world, no programmer would ever do something
that mean with a macro called TRUE. Right? :-)

-- Chris


Post a reply to this message

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