POV-Ray : Newsgroups : povray.newusers : difference, plane : Re: difference, plane Server Time: 20 Nov 2008 12:38:57 GMT
  Re: difference, plane  
From: Slime
Date: 12 Apr 2008 21:23:15
>  The problem with that would be that if they were mandatory you wouldn't
> be able to do things like this:

A common solution is to allow an extra comma at the end of lists, so you 
could do:

> #declare Spline =
>  spline
>  { cubic_spline
>    #declare Ind = 0;
>    #while(Ind < Amount)
>      Ind/(Amount-1), Point[Ind],
>      #declare Ind = Ind+1;
>    #end
>  };

I know C allows this in some cases and it's very convenient. (Maybe POV-Ray 
does too, but my point is that it works well when commas are required, which 
is good for avoiding problems like steven's.)

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

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