POV-Ray : Newsgroups : povray.general : Why does POV always evaluate both expressions with a '&'? : Re: Why does POV always evaluate both expressions with a '&'? Server Time
7 Aug 2024 17:24:01 EDT (-0400)
  Re: Why does POV always evaluate both expressions with a '&'?  
From: Jaime Vives Piqueres
Date: 27 Sep 2001 15:00:47
Message: <3BB37763.77E42F48@ignorancia.org>

>  #local i = n;
>  #while(i >= 0)
>   #if(a[i] != 0)
>    #declare n = i;
>   #end
>   #declare i = i - 1;
>  #end

 He, he... That's what a "real" programmer calls "good style". .. :)
These are the kind of things I never come up myself (I don't consider my
self a "real" programmer at all). But in my simplicity, I will like it
more this way:

#local i=0;
#while (i<n)  
 #if (a[i]!=0)
  #break
 #end
 #local n=n+1
#end

  ...a pain it doesn't works, although I rarely need to use it with POV
scripts.

-- 
Jaime Vives Piqueres

La Persistencia de la Ignorancia
http://www.ignorancia.org/


Post a reply to this message

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