| 
  | 
hi,
kurtz le pirate <kur### [at] gmail com> wrote:
> ...
> Quickly:
should have stopped for coffee.  </grin>
> the trans() macro doesn't know the values of 'i' and 'ang'.
> Either declare these variables globally, or pass them as parameters.
'ang' is global, '#declare'd.  but (sorry) you're wrong re the 'i', see below.
without passing it as an argument cannot modify it though.
and to clarify:
> use '#local' inside macros, rather than '#declare's.
unless you do want to modify global variables.
regards, jr.
-----<snip>-----
#version 3.7;
global_settings {assumed_gamma 1}
box {0,1}
#declare foo_ = 12345;
#macro m_b()
  #debug concat("foo ",str(foo_,0,0)," bar ",str(bar_,0,0),".\n")
#end
#macro m_a()
  #local bar_ = 67890;
  m_b()
#end
m_a()
 
 Post a reply to this message 
 | 
  |