'y' is a reserved word?

NMODL and the Channel Builder.
Post Reply
fietkiewicz
Posts: 18
Joined: Thu Jun 27, 2013 5:13 pm
Location: Hobart and William Smith Colleges
Contact:

'y' is a reserved word?

Post by fietkiewicz »

Is the following invalid because 'y' is a reserved word?

Code: Select all

NEURON {
	SUFFIX test5
}

STATE { y }

BREAKPOINT {
	SOLVE states METHOD derivimplicit
}

INITIAL {
	y = 10.0
}

DERIVATIVE states {
	y' = 0
}
I get the following compilation error:

Code: Select all

test5.c:109:16: error: redefinition of 'y0' as different kind of symbol
 static double y0 = 0;
 
Other names are fine.
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: 'y' is a reserved word?

Post by hines »

y cannot be the name of a STATE as that automatically declares y0 for the initial value. Unfortunately y0() is the Bessel function of the first order and is declared in math.h.
fietkiewicz
Posts: 18
Joined: Thu Jun 27, 2013 5:13 pm
Location: Hobart and William Smith Colleges
Contact:

Re: 'y' is a reserved word?

Post by fietkiewicz »

Thanks for explaining.
Post Reply