I have macro that calls other macros...
#macro generateTail()
#declare tailType = int(rand(rnd)*3)+1;
#switch(tailType)
#case(1)
generateTail1()
#break
#case(2)
generateTail2()
#break
#case(3)
generateTail3()
#break
#end
#end
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?
Post a reply to this message
|