|
![](/i/fill.gif) |
kurtz le pirate <kur### [at] yahoo fr> wrote:
> comma, no comma... documentation at
> http://www.povray.org/documentation/view/3.6.1/286/ is a little a
> ambiguous ! the syntax is :
Yes, the documentation is a bit vague on the usage of commas as list
item separators.
However, povray is very permissive about missing commas as long as it
is unambiguous where the limit between the items is. However, this should
be used with care.
For example:
#define A = array[3] { a b c };
is equal to
#define A = array[3] { a, b, c };
and even:
#define A = array[3] { 1 2 3 };
is equal to:
#define A = array[3] { 1, 2, 3 };
However, be very careful with lists like this:
#define A = array[3] { 1 2 -3 };
because these can contain unexpected surprises.
The optionality of commas in most places is very handy because it allows
you to create item lists in a loop without having to worry if a comma is
required/prohibited in some place.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |