POV-Ray : Newsgroups : povray.general : Is there a more dynamic way of doing this... : Re: Is there a more dynamic way of doing this... Server Time
6 Oct 2024 09:16:08 EDT (-0400)
  Re: Is there a more dynamic way of doing this...  
From: Christian Froeschlin
Date: 1 May 2014 19:18:25
Message: <5362d641$1@news.povray.org>
On 26.04.2014 15:31, FNH wrote:

> If I want to add in a fourth generateTail macro, I have to update the random
> statement, then add a new "case" statement into the "switch". Can I call a macro
> dynamically, by perhaps adding the random number to "generateTail" and calling
> the result?

I've never tried this myself but I think it is possible to
generate code in the program (as text), write it to a file, and
then #include the generated file. So you could have a macro that
generates the switch statement for N macros.


Post a reply to this message

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