POV-Ray : Newsgroups : povray.general : parsing problem in POVRay : Re: parsing problem in POVRay Server Time
4 Aug 2024 00:19:51 EDT (-0400)
  Re: parsing problem in POVRay  
From: Warp
Date: 2 Sep 2003 16:27:49
Message: <3f54fd45@news.povray.org>
"JC (Exether)" <no### [at] spamfr> wrote:
> #macro Return_Int (A)
>    #if (A>0)
>      A
>    #else
>      0
>    #end
> #end

  This is a typical place for making a mistake in the SDL syntax (and
perhaps would reserve an entry in the povQ&T page).
  The right way of doing this is:

#macro Return_Int (A)
   #if (A>0)
     #local retval = A;
   #else
     #local retval = 0;
   #end
   retval
#end

  The reason for this is because how the parser works... But it's a bit
too complicated for me to explain this late at night. :)

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

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