POV-Ray : Newsgroups : povray.bugreports : #while in a macro : #while in a macro Server Time
28 May 2024 23:20:03 EDT (-0400)
  #while in a macro  
From: ruti
Date: 16 Jan 2016 08:35:00
Message: <web.569a462899b4b92b7f8f5560@news.povray.org>
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;

object { myMacro (0, 20, myBox)}

Maybe there's a solution from someone...


Post a reply to this message

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