POV-Ray : Newsgroups : povray.bugreports : The macro scope / identifier / semicolon bug : Re: The macro scope / identifier / semicolon bug Server Time
20 Mar 2026 10:46:07 EDT (-0400)
  Re: The macro scope / identifier / semicolon bug  
From: jr
Date: 19 Mar 2026 13:35:00
Message: <web.69bc32f2b3a149a848bf72fa6cde94f1@news.povray.org>
hi,

"Bald Eagle" <cre### [at] netscapenet> wrote:
> I've run into the issue where assigning the final value(s) of a macro to an
> indentifier such as "Result" and then having the final line of the macro be:
> Result triggers the ole' "attempt to assign uninitialized identifier to Lvalue"
> error.
> ...
> The idiom:
>
> ```pov
> #macro Foo()
>     #local Result = 1 + 2;
>     Result
> #end
>
> #local X = Foo();
> ```
>
> After macro expansion, the parser sees:
>
> ```pov
> #local X = 1 + 2
> ```

really ?  would it not "see":
  #local X = 3

anyway, that is as far as I could read the .. generated content.


regards, jr.


Post a reply to this message

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