POV-Ray : Newsgroups : povray.general : #declare really is anxious about its semicolon : Re: #declare really is anxious about its semicolon Server Time
25 Apr 2024 00:49:36 EDT (-0400)
  Re: #declare really is anxious about its semicolon  
From: Kenneth
Date: 11 Oct 2017 06:30:00
Message: <web.59ddf1c3d7b90bfb89df8d30@news.povray.org>
"Ard" <and### [at] gmailcom> wrote:
>
> 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.

That would seem to make sense (at least to me) for the following reason: If the
#if is 'true', then 123 is the value-- and a regular #local or #declare has the
semicolon after that VALUE itself.  Still, your example is an interesting one--
I've never used an #if() block *as* an Rvalue. (Hmm, what happens to #local A if
the #if is 'false'?)

I'm curious: In this successful example (shifting the semicolon), did you try
leaving out the #end statement altogether? If so, did the #local still work OK,
or did all hell break loose? ;-)


Post a reply to this message

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