POV-Ray : Newsgroups : povray.advanced-users : No semicolon allowed in Tuple-style assignments? : No semicolon allowed in Tuple-style assignments? Server Time
2 May 2024 05:02:57 EDT (-0400)
  No semicolon allowed in Tuple-style assignments?  
From: Bald Eagle
Date: 26 Mar 2023 15:35:00
Message: <web.64209db9e0deeaab1f9dae3025979125@news.povray.org>
So, I was just coding a few more macros, and I wanted to return a few vectors.

Pre-3.8, I'd normally handle this using a small array, but the nested macro call
that I was copy-paste-editing had the output that I needed as arguments, and I
figured I'd just use the tuple-style #declare.

I got a weird error about "expecting } found ; instead" and as all of my other
bits of code in the scene were working, with #declare LValue = value; inside of
union {}s, I was puzzled and confused.

After checking that there wasn't some { that got put somewhere by accident, I
took one of the tuple assignments
#declare (this, that) = ThisMacroReturns2Values (arg1, arg2, ar3);
and deleted the trailing semicolon - and BEHOLD!  the error vanishes.

That makes for coding awkwardness and confusion.

(I also run into the same kind of thing when I'm putting commas into a cylinder
{} and use an extra comma in between the second endpoint and the cylinder
radious - POV-Ray no likey.)


Post a reply to this message

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