POV-Ray : Newsgroups : povray.general : How do I pass a macro as a parameter? Server Time
4 Nov 2024 19:23:52 EST (-0500)
  How do I pass a macro as a parameter? (Message 1 to 1 of 1)  
From: Peter Popov
Subject: How do I pass a macro as a parameter?
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.