POV-Ray : Newsgroups : povray.bugreports : Mis-matched '#end' invoking macro with a while loop Server Time
29 Apr 2024 01:35:21 EDT (-0400)
  Mis-matched '#end' invoking macro with a while loop (Message 1 to 4 of 4)  
From: MadKairon
Subject: Mis-matched '#end' invoking macro with a while loop
Date: 7 Jul 2009 12:15:01
Message: <web.4a5373c09263790277532a5a0@news.povray.org>
#include "colors.inc"
  background { color rgb <.5, .4, .3> }
  #declare Rnd_1 = seed (1153);



  camera {
    location <0, 3, -23>
    look_at  <1, 2,  0>
  }

light_source {<100,200,-100> colour rgb 1}


#macro Make_Frame()
             #declare n = 1;
             while (n = 1 )
             box { <0,0,0>,<1,1,1>
             pigment{rgb .5}
             finish { phong 1 }
             scale <rand(Rnd_1)/5,rand(Rnd_1)/2,rand(Rnd_1)*1.5>
             translate <rand(Rnd_1)/2,rand(Rnd_1)/2,rand(Rnd_1)*4>
             }
             #declare n=n+1;
             #end
#end

object { Make_Frame() translate <.5,.5,.5> }

results en mis-matched #end


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Mis-matched '#end' invoking macro with a while loop
Date: 7 Jul 2009 14:07:21
Message: <4a538ed9$1@news.povray.org>
Not a bug in POV-Ray but in your file: Your while is missing the #!

MadKairon wrote:
>   #include "colors.inc"
>   background { color rgb <.5, .4, .3> }
>   #declare Rnd_1 = seed (1153);
> 
> 
> 
>   camera {
>     location <0, 3, -23>
>     look_at  <1, 2,  0>
>   }
> 
> light_source {<100,200,-100> colour rgb 1}
> 
> 
> #macro Make_Frame()
>              #declare n = 1;
>              while (n = 1 )
>              box { <0,0,0>,<1,1,1>
>              pigment{rgb .5}
>              finish { phong 1 }
>              scale <rand(Rnd_1)/5,rand(Rnd_1)/2,rand(Rnd_1)*1.5>
>              translate <rand(Rnd_1)/2,rand(Rnd_1)/2,rand(Rnd_1)*4>
>              }
>              #declare n=n+1;
>              #end
> #end
> 
> object { Make_Frame() translate <.5,.5,.5> }
> 
> results en mis-matched #end
> 
>


Post a reply to this message

From: clipka
Subject: Re: Mis-matched '#end' invoking macro with a while loop
Date: 8 Jul 2009 17:55:01
Message: <web.4a551578a71b7e0ede52d56d0@news.povray.org>
"MadKairon" <nomail@nomail> wrote:
> #macro Make_Frame()
>              #declare n = 1;
>              while (n = 1 )

Even at the risk of triggering that famous forehead-slapping reflex: Try
replacing this with:

             #while (n = 1 )

;)


Post a reply to this message

From: Warp
Subject: Re: Mis-matched '#end' invoking macro with a while loop
Date: 9 Jul 2009 08:44:40
Message: <4a55e637@news.povray.org>
clipka <nomail@nomail> wrote:
> "MadKairon" <nomail@nomail> wrote:
> > #macro Make_Frame()
> >              #declare n = 1;
> >              while (n = 1 )

> Even at the risk of triggering that famous forehead-slapping reflex: Try
> replacing this with:

>              #while (n = 1 )

> ;)

  So POV-Ray was entirely correct: There *was* a mismatched #end.

-- 
                                                          - Warp


Post a reply to this message

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