Ignore:
Timestamp:
Nov 2, 2009 10:55:37 AM (13 years ago)
Author:
srkline
Message:

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").

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Common/NCNR_Package_Loader.ipf

    r570 r588  
    335335 
    336336end 
     337 
     338Function WhatSymbolsAreDefined() 
     339 
     340#if (exists("QUOKKA")==6) 
     341                print "function QUOKKA defined" 
     342#else 
     343                print "function QUOKKA NOT defined" 
     344#endif 
     345         
     346#if(exists("HFIR")==6) 
     347                print "function HFIR defined" 
     348#else 
     349                print "function HFIR NOT defined" 
     350#endif 
     351         
     352#if(exists("ILL_D22")==6) 
     353                print "function ILL_D22 defined" 
     354#else 
     355                print "function ILL_D22 NOT defined" 
     356#endif 
     357 
     358 
     359 
     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.  
     365         
     366//      SetIgorOption poundDefine=QUOKKA? 
     367//      if(V_flag) 
     368//              print "QUOKKA defined" 
     369//      else 
     370//              print "QUOKKA NOT defined" 
     371//      endif 
     372//       
     373//      SetIgorOption poundDefine=HFIR? 
     374//      if(V_flag) 
     375//              print "HFIR defined" 
     376//      else 
     377//              print "HFIR NOT defined" 
     378//      endif 
     379//       
     380//      SetIgorOption poundDefine=ILL_D22? 
     381//      if(V_flag) 
     382//              print "ILL_D22 defined" 
     383//      else 
     384//              print "ILL_D22 NOT defined" 
     385//      endif 
     386 
     387        return(0) 
     388End 
     389 
     390Proc ClearDefinedSymbols() 
     391        SetIgorOption poundUnDefine=QUOKKA 
     392        SetIgorOption poundUnDefine=HFIR 
     393        SetIgorOption poundUnDefine=ILL_D22 
     394End 
Note: See TracChangeset for help on using the changeset viewer.