POV-Ray : Newsgroups : povray.bugreports : #while in a macro : Re: #while in a macro Server Time
23 Apr 2024 17:55:11 EDT (-0400)
  Re: #while in a macro  
From: ruti
Date: 16 Jan 2016 08:40:00
Message: <web.569a479a5b851d257f8f5560@news.povray.org>
"ruti" <jru### [at] ruti-agch> wrote:
> Hello
> I just discovered something, which Looks to me like a bug: When I try to use
> #while in a macro, I get an error-message:
>
> Parse Error: No matching } in 'object', object found instead
>
> I append the code which triggers the error:
>
>
> //---------------------------------------------------------------------
> #declare myBox = box {<0,0,0> <1,1,1> texture{pigment{color <1,1,1>}}}
>
> #macro myMacro (myStart, myEnd, myBox)
>    #local myVar = myStart;
>
>    #while (myVar <10)
>        object {myBox translate <myVar,0,0>}    //Here occurs the error
>       #local myVar = myVar + 2;
>    #end
> #end
>
> object { myMacro (0, 20, myBox)}
> //---------------------------------------------------------------------
>
Using Windows 8 and POVRAY-Version 3.7 (64)
> Maybe there's a solution from someone...
>
> Greetings
> Juerg


Post a reply to this message

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