Problem with TN020 Procedures.ipf

Hi,

i want to use the TN020 Procedures.ipf file, which i got here:
ftp://ftp.wavemetrics.net/IgorPro/Technical_Notes/

Problem is, i work in an environment in which the function calc already exists and i need to use both. I didnt program this environment/macros, so i want to avoid messing around with it.

When i open TN020 Procedures.ipf and then click on Macros -> initialize most everything i get an error:
"Name already exists as user function"
Error in TN020 Procedures.ipf:InitPeakMacros
String/G S_Wave,new,none,calc

So i just changed the name of the variable calc in the TN020 procedure to calcaz

Now a new error comes while executing Macros -> initialize most everything:
got "calcaz" instead of a string variable or string function name.
Error in TN020 Procedures.ipf:InitPeakMacros
Prompt wx,p_wx,popup,calcaz+WaveList("*", ";","")

Even through calcaz is introduced in the beginning:
String/G S_Wave,new,none,calcaz
    new="_New_;"
    none="_None_;"
    calcaz="_calculated_;"


Has anybody an idea what s the problem?

Thanks in advance!
W.

I don't have your procedures that conflict with the variable "calc" but...

1) Calling a function "calc" is not good practice. It's way too generic. Over the years my function names have gotten more and more bizarre; now I'm apt to use something like "IPF_calc_simulated_friction" where IPF might be an abbreviation derived from the package name. But you say it's not your code and you're stuck with it... The global variable in Tech Note 20 shouldn't use that name, either, but that code is more than 20 years old, and at the time it was written every byte had to be conserved so long variable names were not an option.

2) I tried the change you tried and it worked. Be sure you change every instance of the variable calc to calcaz. I must have changed about 20 instances.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com