POV-Ray : Newsgroups : povray.general : #declare really is anxious about its semicolon : Re: #declare really is anxious about its semicolon Server Time
26 Apr 2024 22:52:57 EDT (-0400)
  Re: #declare really is anxious about its semicolon  
From: jr
Date: 7 Oct 2017 06:28:00
Message: <59d8ac30$1@news.povray.org>
hi,

On 07/10/2017 10:04, Ard wrote:
> Greetings, all.  I do not know whether this is a misbehaviour, so I shall post
> about it here rather than in the bugs group.
> The following line fails to parse, with "All #declares of [etc] require
> semi-colon ';' at end if the language version is set to 3.5 or higher".
>   #local A = #if (1) 123 #end ;
> If you shift the semicolon to before the #end, it's good.  Or, this:
>   #local A = #if (1) 123+ #end 0 ;
> The example here is trivial of course but in my case the "123" was actually a
> vector coming out of the mother of all macros, so finding the root cause took
> some head-scratching.

parentheses help:

#local A = (#if (1) 123 #end) ;

regards, jr.


Post a reply to this message

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