|
![](/i/fill.gif) |
Removing the declare would be very difficult from the standpoint of the
parser since, if you have a variable by itself, POV interprets it as a
float identifier and not an assignment statement. However, maybe a shortcut
like just putting a special character at the beginning would allow the parser
to know that it is an assignment. (like maybe a '%'. Is that used elsewhere
in POV?) Then you would use
%e=i*2;
instead of
#declare e=i*2;
and the compiler would still know what you're talking about.
I also still think we should always be able to redeclare anything as any
other type (maybe warnings should be issued, but not for float -> vector
conversions).
-Nathan
TonyB wrote:
>
> I have already suggested that a for() loop and increment and decrement operators
> as a nice addition to the pov language. Another thing someone once said was that
> there might be a way of removing #declare and just dive directly into making x
> equal y.
>
> //Example:
>
> #for(i=0; i<10; i++)
> e=i*2;
> sphere {0,1 pigment {rgb sqrt(e)}
> e*=.1;
> box {e,-e pigment {red e}}
> /*
> this is just a wierd suggestion that came right
> off the top of my head, but it gives you an
> idea of the benefits of simplicity that could
> be reaped.
> */
> #end
>
> --
> Anthony L. Bennett
> http://welcome.to/TonyB
>
> Graphics rendered
> by the Dreamachine.
Post a reply to this message
|
![](/i/fill.gif) |