What is the Julia equivalent of the following C code:
#ifdef _USE_NATURAL
const scalar c=1.0;
const scalar e=0.302822;
#else
const scalar c=2.99792458e10;
const scalar e=4.80320425e-10;
#endif
I need c
and e
to be defined at module level. They are just constants, but I want to give the user the option to choose which set of constants they want to use (which physically corresponds to different set of units; this is a physical simulation).
This is baby-easy in C due to the existence of the preprocessor but I can't seem to figure out how to change the behavior of modules on import. Is it possible?