POV-Ray : Newsgroups : povray.general : parsing problem in POVRay : Re: parsing problem in POVRay Server Time
4 Nov 2024 21:23:54 EST (-0500)
  Re: parsing problem in POVRay  
From: Mike Williams
Date: 2 Sep 2003 16:22:03
Message: <RJeY8FAQsPV$Ewew@econym.demon.co.uk>
Wasn't it JC (Exether) who wrote:
>I think I found a potential bug that I couldn't find in the know bugs, 
>so I report here, I hope it's the right group. Here is the code :
>
>#macro Return_Int (A)
>   #if (A>0)
>     A
>   #else
>     0
>   #end
>#end
>
>#local Var1=Return_Int (5);

The conventional way of writing this so that POV accepts it would be to
put it in brackets, like this:

#macro Return_Int (A)
   #if (A>0)
     A
   #else
     0
   #end
#end

#local Var1=(Return_Int(5));

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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