POV-Ray : Newsgroups : povray.general : #declare : Re: #declare Server Time
5 Aug 2024 08:26:17 EDT (-0400)
  Re: #declare  
From: Francois Labreque
Date: 18 Oct 2002 22:12:08
Message: <3DB0BE8C.3040102@videotron.ca>
Christopher James Huff wrote:


> redesign the language and use something more like:
> 
> def myCounter = 0;
> while(myCounter < 10) {
>     myCounter += 1;
> }

Having +=, -=, etc... would certainly be nice.  Even with #declare, if 
it issued and error for uninitialized variables, for example:

#declare myCounter = 0;
#while( myCounter < 10 ) {
     #declare myCountr += 1;
}

The parser could choke and issue an error because it doesn't know what 
the initial value of "myCountr" is.

-- 
/*Francois Labreque*/#local a=x+y;#local b=x+a;#local c=a+b;#macro P(F//
/*    flabreque    */L)polygon{5,F,F+z,L+z,L,F pigment{rgb 9}}#end union
/*        @        */{P(0,a)P(a,b)P(b,c)P(2*a,2*b)P(2*b,b+c)P(b+c,<2,3>)
/*   videotron.ca  */}camera{orthographic location<6,1.25,-6>look_at a }


Post a reply to this message

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