Does anyone know if the following code can be made to work? Alternative
would also be appreciated:

#define INIT_MODULE(id) \
    #if (id == 0)\
        #error "Invalid ID"\
    #else\
        #define __MODULE_ID__\
        int __module_id = id;\
    #endif

The __MODULE_ID__ is required later on in the preprocessing. Any
suggestions? I would hate to have to sit and write my own preprocessor :-/

Thanks
Manohar

Reply via email to