POV-Ray : Newsgroups : povray.advanced-users : passing variable to macro for use in #for statement : Re: passing variable to macro for use in #for statement Server Time
26 Apr 2024 18:42:29 EDT (-0400)
  Re: passing variable to macro for use in #for statement  
From: clipka
Date: 20 Sep 2018 17:25:36
Message: <5ba41050$1@news.povray.org>
Am 20.09.2018 um 22:43 schrieb Kenneth:
> clipka <ano### [at] anonymousorg> wrote:
>> Am 20.09.2018 um 20:56 schrieb Kenneth:
> 
>>
>>> The even shorter keyword  #elif  (for #elseif) is not mentioned there (even
>>> though it works)...
>>
>> Actually, no, it doesn't work: That's a mirage. If you examine it more
>> carefully, you'll find that the construct only behaves as expected if...
> 
> Oh, sorry. I didn't thoroughly test the  #elif  keyword; I used your macro
> construct as-is (basically), and it just *happened* to work in my case, or
> appeared to.

Yeah, been there, done that. When you mentioned that both `#elseif` and
`#elif` seemed to work, I was like "huh? I'm not sure which of the two I
implemented, but I'm pretty darn sure I didn't implement both" - did a
short test myself, and lo and behold - `#elif` didn't produce an error.

So yeah, `#elif` must be what I had implemented, and I must have screwed
up the docs, accidently communicating it as `#elseif`...

Just for funsies and because I always love to double-check even if I
/know/ the results [hah!], let's just replace `#elif` with `#elseif` to
prove my point...

... huh? That didn't produce an error either; did I /really/ implement
both alternatives? Wow, clever me...

... um, wait, WTF?! Didn't that scene behave differently with `#elif`?!

Now I'm officially puzz...
... D'OH! - yeah, THAT is what's happening...


I love the smell of truth dawning on me.


Post a reply to this message

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