POV-Ray : Newsgroups : povray.general : Empty value for variable : Re: Empty value for variable Server Time
30 May 2023 11:05:30 EDT (-0400)
  Re: Empty value for variable  
From: jr
Date: 7 Feb 2023 01:15:00
Message: <web.63e1eb8d5d560c7488a828ca6cde94f1@news.povray.org>

"Bald Eagle" <cre### [at] netscapenet> wrote:
> "yesbird" <nomail@nomail> wrote:
> > Sorry, solution was:
> > -------------------
> > _vector(1,,    ) // OK
> > -------------------
> > Number of commas is matter
> > YB

yes, optional value(s), not position(s).

> Yes, and that's why I find that method awkward.

for YB's benefit, I think that may be just because the parser is so .. lenient
elsewhere.  as you know, much POV-Ray code published here "skimps" on detail,
the ';' terminator is rarely used (or "taken serious" even, I feel), meshes and
such often omit the commas between neighbouring vector values etc.  in fact,
'box {your ears}' would have sufficed ;-).  with the macro it's simply that
w/out the commas, the parser would have no (literal) clue which of the args were

> There's also no way to write a macro with a variable number of arguments - it
> has to be fixed.
> But now that we have dynamic arrays, and indeed, mixed arrays, I think I'd opt
> for passing an array of arguments in, and then having the macro analyze and
> process the array.

yes.  (dictionaries, too)

regards, jr.

Post a reply to this message

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