POV-Ray : Newsgroups : povray.beta-test : bug with #declare order : Re: bug with #declare order Server Time
30 Jul 2024 20:18:15 EDT (-0400)
  Re: bug with #declare order  
From:
Date: 26 Oct 2001 10:02:20
Message: <joqitt063eivvf17ilrcc5ebbhmecq37fg@4ax.com>
On Fri, 26 Oct 2001 15:48:02 +0200, "Thorsten Froehlich"
<tho### [at] trfde> wrote:

> > #macro B() array#local C=1;#while(C<=5)[C]#local C=C+1;#end #end
> > #local A=B()
> >
> > it still not work with beta 6
>
> Move the "array" out of the macro perhaps? 

No. It not work and cursor is wrongly positioned inside line when
showing error.

> Or have the whole declare in the
> macro?

The same error: Expected 'object or directive'.

And the same thing appear when I call elements of declared array. This
not work:

#local A=array[1][1][1][1][1]{{{{{0}}}}}
#local B=A #local C=1;#while(C<=5)[0]#local C=C+1;#end

Do you agree it should works ? I ask becouse it could shorten a lot my
macros for arrays.inc requested by Rune.

ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)|_((x+y)*.7,z,.1)|_((x+y+2)*.7,z,.1)|_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35


Post a reply to this message

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