Simple Calculation

I am getting an error : Unexpected End of Function Definition
when I try to compile the following macro:


#pragma rtGlobals=1		// Use modern global access method.
Menu "Macros"
	"DO Calibration Point Calculator", PointCalculator()
End
 
Function PointCalculator()
	variable A = 15, tau = 15, x0 = 23, y0 = -0.5
	variable lifetime = 60, concentration = 20
	Prompt A, "A : "
	Prompt tau, "Tau : "
	Prompt x0, "x0 : "
	Prompt y0, "y0 : "
	DOPrompt "Coefficients", A, tau, x0, y0
	Prompt lifetime, "Enter a lifetime value : "
	DOPrompt "Lifetime Input", lifetime
	concentration = y0 + A*exp(-(lifetime-x0)/tau)


Basically, heres what the macro is supposed to do:
- get an input from the user "lifetime". This should just be some numerical value
- use the formula y = y0 +A*exp(-(x-x0)/tau)
- assign this y value to the variable "concentration"

Do you know why I am getting this error?

Cory K wrote: I am getting an error : Unexpected End of Function Definition
when I try to compile the following macro:


#pragma rtGlobals=1		// Use modern global access method.
Menu "Macros"
	"DO Calibration Point Calculator", PointCalculator()
End
 
Function PointCalculator()
	variable A = 15, tau = 15, x0 = 23, y0 = -0.5
	variable lifetime = 60, concentration = 20
	Prompt A, "A : "
	Prompt tau, "Tau : "
	Prompt x0, "x0 : "
	Prompt y0, "y0 : "
	DOPrompt "Coefficients", A, tau, x0, y0
	Prompt lifetime, "Enter a lifetime value : "
	DOPrompt "Lifetime Input", lifetime
	concentration = y0 + A*exp(-(lifetime-x0)/tau)

...



end


Have you missed putting an "end" statement for the function or was this just a typo in posting?

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
.... wow, now I feel stupid.
I can write all that and then leave off the easy part.
Oh well, thanks for catching that.