|
|
Am 11.10.2017 um 12:26 schrieb Kenneth:
> "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? ;-)
Please don't try this at home; a containment lab would be recommended
for such experiments ;)
As a matter of fact, there are known situations where leaving out
closing stuff (`#end`, closing parentheses, closing braces) in an
include file may indeed cause POV-Ray to crash hard.
And no, I'm not doing anything about it, because for each of these cases
I fix, I tend to discover two more that are twice as difficult to get
rid of.
It's a hydra thing, and I've decided to stop exhausting myself fighting
it. As long as it just lies there dormant, only swallowing the
occasional unwary passer-by once a year, I'm fine ;)
Post a reply to this message
|
|