POV-Ray : Newsgroups : povray.off-topic : Random C craziness : Re: Random C craziness Server Time
7 Sep 2024 05:11:41 EDT (-0400)
  Re: Random C craziness  
From: Invisible
Date: 24 Jul 2008 07:50:02
Message: <48886c6a$1@news.povray.org>
>> Can somebody interpret this for me?
>>
>>   while (TRUE) { cont = (*cont)(); }
>>
>> What on earth...?
> 
> cont is a pointer to a function that is expected to return a pointer to 
> a function.  The code here causes a series of functions to be called, 
> each one specifying another function to be called afterwards by 
> returning the address of the function to be called.

Ah, so it *is* possible to read C? :-)

So cont points to a zero-argument function that returns a zero-argument 
function? And this loop just calls it repeatedly?

-- 
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.