Conditional Compilation Straddling Function Definitions

IP Manual:
Conditionals must be either completely outside or completely inside function definitions; they cannot straddle a function definition.


I would appreciate the ability to have conditional compilation straddle function definitions.

Motivation: I am in the process of debugging a large codebase of interdependent ThreadSafe functions. It would be very handy to be able to remove the ThreadSafe declaration from them all with a #define setting, enabling the Igor debugger.

Example code using wished-for feature:
#define USETHREADSAFE

#if USETHREADSAFE
ThreadSafe Function myFunc(var, str)
#else
Function myFunc(var, str)
#endif
   Variable var
   String str
   // Function body
End


I'm sure others could come up with more clever uses, too.
There's no harm in leaving a function marked Threadsafe; you can still call it from a non-Threadsafe routine.

As far as conditional compilation straddling function definitions, I can see it being useful, but it would come at a cost: development time that could be better spent elsewhere.

--Jim Prouty
Software Engineer, WaveMetrics, Inc.