POV-Ray : Newsgroups : povray.bugreports : alpha.10064268 macro problem : Re: alpha.10064268 macro problem Server Time
28 Apr 2024 20:13:02 EDT (-0400)
  Re: alpha.10064268 macro problem  
From: jr
Date: 5 Apr 2021 02:15:00
Message: <web.606aa9d254e5aaba79819d986cde94f1@news.povray.org>
hi,

"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> "jr" <cre### [at] gmailcom> wrote:
> >...
> > :-)
> >
> > seriously though, thank you for this clear outline of "events".  excellent.  I
> > seem to think too much in terms of (conventional) function/procedure when using
> > SDL.  (time for coffee + thinking cap :-))
>
> No problem. It was an interesting challenge to find out what was going on.
> It can take a while to become familiar with how POV-Ray's macros really work and
> how they can be best utilized.

too true.  (I fear :-))

> Then back to your code:
> How about writing out (appending ?) all the "user macro" calls to a file while
> "walking" the array, and then include that file for parsing afterwards ?
> If you do it that way then the fore_call macro can return a single value
> suitable for the ! operator.

the thought never occurred, and, to be honest, does not appeal.  too "indirect"
for me, I guess.  having said that, I see no reason why the user could not write
a payload macro to do that, where useful.


> BTW: Are you aware that there are some macro parameters that are never used ?

off-hand I can only think of 'a_' in the 'fore_call'.  I thought I'd need it
since the 'cmd_' string refers to it (and I thought expansion happens in line
107).

while on the subject, and given you seem interested :-), I'm pondering how to
reduce duplication of essentially identical/near identical code; am thinking
that an "odometer" type macro to compute the set of indices would allow me to
write much more "compact" walker macros.  any suggestions?  cheers.


regards, jr.


Post a reply to this message

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