POV-Ray : Newsgroups : povray.general : How do I pass a macro as a parameter? : How do I pass a macro as a parameter? Server Time
12 Aug 2024 17:14:23 EDT (-0400)
  How do I pass a macro as a parameter?  
From: Peter Popov
Date: 27 Jan 1999 22:49:40
Message: <36b2dcc0.29414704@news.povray.org>
Just recently the following problem arose. I have a macro and I want
to pass to it another macro as a parameter. The problem gets bigger as
I don't know the second macro's number of parameters. So if I have
macros A, B and C, I want to do something like

#macro A( vector, float, string, B)
  #local variable = B;
  C(variable)
#end

and then invoke it in this (or similar) manner:

#declare another_variable = 
A( <1,3,1>, 5.34, "3455sdf", function(clock*clock + 1));

Is this possible at all?

Peter


Post a reply to this message

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