FA> I'm trying to refer to a memory location, and define two similar functions
FA> according to the value in there.
FA> I know a couple of other ways to do it, but i was trying to go..
FA> #define VAL *MK_FP(here,there)
FA> #if(VAL)
FA> #define func() func1()
FA> #else
FA> #define func() func2()
FA> #endif
FA> It looked good, but maybe i just can't compile until the compiler gets a
FA> chance to compile ? :-)
Yeah, you can't get the preprocessor to go and look at a memory location in
advance for you! What you can do is define two functions, and then at
runtime, choose between them. You do this with a function pointer, called
func(), and point it to either func1() or func2(). BFN. Paul.
@EOT:
---
* Origin: X (3:711/934.9)
|