Nov 2, 2009 10:55:37 AM (13 years ago)

Added conditional compile instructions to some reduction procedure files that have only minor facility-specific changes. These changes are not significant enough to merit a separate facility file that must be maintained with essentially duplicate functions.

#define SYMBOL was attempted, but did not work since the symbols weren't actually defined until after the compile... and I couldn't figure out how to define - then compile. in additon, the table is static until Igor is quit - so multiple symbols could be defined, and compiling would fail.

So... the method now that appears to work is to put a dummy function for each facility in its facility specific "Includes" file. Then the conditional compilation checks for exists("function").

1 edited


  • sans/Dev/trunk/NCNR_User_Procedures/Common/NCNR_Package_Loader.ipf

    r570 r588  
     338Function WhatSymbolsAreDefined() 
     340#if (exists("QUOKKA")==6) 
     341                print "function QUOKKA defined" 
     343                print "function QUOKKA NOT defined" 
     347                print "function HFIR defined" 
     349                print "function HFIR NOT defined" 
     353                print "function ILL_D22 defined" 
     355                print "function ILL_D22 NOT defined" 
     360// for a lot of reasons, defined symbols do not work 
     361// mostly, the procedures are compiled before the symbols are 
     362// defined (or re-defined) 
     363// another issues is that they are persistent, and  don't disappear 
     364// until Igor is quit.  
     366//      SetIgorOption poundDefine=QUOKKA? 
     367//      if(V_flag) 
     368//              print "QUOKKA defined" 
     369//      else 
     370//              print "QUOKKA NOT defined" 
     371//      endif 
     373//      SetIgorOption poundDefine=HFIR? 
     374//      if(V_flag) 
     375//              print "HFIR defined" 
     376//      else 
     377//              print "HFIR NOT defined" 
     378//      endif 
     380//      SetIgorOption poundDefine=ILL_D22? 
     381//      if(V_flag) 
     382//              print "ILL_D22 defined" 
     383//      else 
     384//              print "ILL_D22 NOT defined" 
     385//      endif 
     387        return(0) 
     390Proc ClearDefinedSymbols() 
     391        SetIgorOption poundUnDefine=QUOKKA 
     392        SetIgorOption poundUnDefine=HFIR 
     393        SetIgorOption poundUnDefine=ILL_D22 
Note: See TracChangeset for help on using the changeset viewer.