POV-Ray : Newsgroups : povray.general : Function of a function, or function as a function parameter : Re: Function of a function, or function as a function parameter Server Time
11 May 2024 13:04:08 EDT (-0400)
  Re: Function of a function, or function as a function parameter  
From: jr
Date: 14 Jan 2024 06:55:00
Message: <web.65a3caac9ff14ccc7f6d9cf76cde94f1@news.povray.org>
hi,

kurtz le pirate <kur### [at] gmailcom> wrote:
> ..., this works well for functions.
> But what about macro in parameter of a macro ?

will passing in its string name do ?


> ...
> I'd like to be able to give at MACRO, M1, M2, ... like that :
> MACRO (P, Q, M1) or MACRO (R, S, M2)
>
> Parse_String(String) doesn't seem to be usable, but I'm not sure I
> understand how it works ;)

the result of calling a Parse_String is the literal replacement of that call
(code) with the contents of the file written.  I'd be likely to adapt the
existing Parse_String() to my needs.  fwiw, my Foreach() macro uses
user-supplied "payload" macros to process array data; though no use to you as
is, perhaps the '__cmdStr()' code may provide ideas.


regards, jr.


Post a reply to this message

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