R
rcoutts
I muddied my last question with c++ so here it is again:
When writing a directive, if you need to refer to the param a couple of
times, e.g.,
#define foo(f) ((f<3 && f>7) ? 5 : 0)
how do you write the directive so that passing a function does result
in the function getting performed more than once? E.g., when I write
foo(bar())
it's getting performed like
((bar()<3 && bar()>7) ? 5 : 0)
which is a real problem if bar() is performing an operation that should
only be done once, like popping a stack.
Thanks,
Rich
When writing a directive, if you need to refer to the param a couple of
times, e.g.,
#define foo(f) ((f<3 && f>7) ? 5 : 0)
how do you write the directive so that passing a function does result
in the function getting performed more than once? E.g., when I write
foo(bar())
it's getting performed like
((bar()<3 && bar()>7) ? 5 : 0)
which is a real problem if bar() is performing an operation that should
only be done once, like popping a stack.
Thanks,
Rich