Origin Ver. and Service Release (Select Help-->About Origin): 8SR6 Operating System: Windows XP
Function A has a fit parameter: double w Function B has a constant: const w=... in the 'after fitting script'
Fitting (fitter dialog) A first and then B (same data; NLFit -> Function Selection -> Function B) I get: W:already declared as double, cannot redeclare in the same scope!
Function B first then A: w:cannot set value to a const!
NLSF keeps previous declarations across the scripts?
The parameters of a function will be created to Origin's workspace once a fit is done. When multiple fits are done, the variables will update with the last one.
You can run command "list a" to see those variables.
So I suggest you use another variable name instead now.
Thank you again for bringing this issue to our attention. We have addressed it in Origin 8.1 SR2. The fitting parameters are no longer global variables. They are local to the NLFit. If you wish to try it out, you can download the demo: