POV-Ray : Newsgroups : povray.advanced-users : Array looped-initialization syntax : Re: Array looped-initialization syntax Server Time
28 Apr 2024 19:32:04 EDT (-0400)
  Re: Array looped-initialization syntax  
From: Le Forgeron
Date: 16 Aug 2016 12:56:52
Message: <57b345d4$1@news.povray.org>
Le 16/08/2016 à 18:45, Bald Eagle a écrit :
> 
> I'm also curious about how folks who code this type of thing handle the
> requirement for a comma, since the LAST element of the array doesn't have one.
> Is there internal POV-Ray Black Magic that handles this?

The parser of comma is very lenient. You can omit the comma, as long as the next value
is not interpreted as a continuation of an expression.

For instance
"A , A" can be written "A A", but if A looks like "-B", or "+C" you are in troubles
and doomed.

And remember #for takes 4 parameters.
1. Variable name
2. Start value
3. End value
4. Step between each value


Post a reply to this message

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