i use define in my testcase,what i want to do is in the first loop i use the define maybe in one branch ,while on the second loop ,i want #undef the define that i defined before and into another branch,but it doesn't work......
codes are like this:
#ifdef AAAA then
#ifndef AAAA then
what really does the sentence means in reference "The effect is propagated to all files that are loaded after the#undef statement is encountered."?
does it means the #undef could not write in just one file ? or between two import e file ,we use #undef ? like the example supported in e_reference:
#define semaphore my_semaphore;import my_design.e;#undef semaphore;import external_code.e;
thank you for your reply......
defines are preprocessor directives. If you want control flow in your code, I would suggest using variables or AOP features (i.e. modifying method in when subtypes). The e language gives you many features, exactly for the flexibility you are looking for. Preprocessor directoves are very un-flexible, so they should be the last resort.
In reply to hannes:
thank you very much!