POV-Ray : Newsgroups : povray.newusers : difference, plane : Re: difference, plane Server Time
28 Jul 2024 16:28:51 EDT (-0400)
  Re: difference, plane  
From: Slime
Date: 12 Apr 2008 17:23:15
Message: <48012843$1@news.povray.org>
>  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-2023 Persistence of Vision Raytracer Pty. Ltd.