POV-Ray : Newsgroups : povray.advanced-users : pass variable from macro? : pass variable from macro? Server Time
5 Jul 2024 16:17:34 EDT (-0400)
  pass variable from macro?  
From: [GDS|Entropy]
Date: 26 Jan 2008 03:40:18
Message: <479af1f2$1@news.povray.org>
Hello,

A little stuck here... evidently povray does not support any type of 
Return() function, and I am not familiar enough with sdl yet to figure this 
out any other way.
This little macro does what it says, but not in this form.

#macro isEvenOrOdd(integer)
 #if(mod(integer,2) = 0)
  #local isEven = 1;
 #else
  #local isOdd = 1;
 #end
#end

I had to use an instance of the following each time that I wished to use 
this function:
       // Determines if even or odd
       #if(mod(glowTypeRand,2) = 0)
        type 0
       #else
        type 2
      #end

There HAS to be some way to pass variables from a macro...right? :-\

Thanks,
Ian


Post a reply to this message

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