constant namespace (module?)
Tue, 09/07/2021 - 04:07 pm
Is there a way to limit the namespaces for constants similar to modules do for Functions? The following doesn't work: -- Procedure "testc.ipf" #pragma TextEncoding = "UTF-8" #pragma rtGlobals=3 #pragma moduleName=xxx Static Constant ktest = 42 -- Procedure #pragma TextEncoding = "UTF-8" #pragma rtGlobals=3 Function doit() Variable x x = xxx#ktest print "x is", x End The callers of my functions needs access to several constants (the same and/or different constants for each function). These functions include both Igor procedures/functions and XOP/functions. I'm worried about namespace collisions on the constant names. PS: What about Structures too? This seems less of a problem to me since I can use a very long name for the structure as the structure name will appear less often (and the STRUCT variable is local).