Page 1 of 1

Error

Posted: Fri Apr 20, 2012 6:32 am
by Amberuk
Hi

I have started getting an error message when I run my hoc code. It is always the last line of the code, even if that line is commented out. The model was working and then I added some code and it stopped working, even when I deleted the added code the error still kept coming up. Here it is:
nrniv: syntax error
in H:/Amber Work/Computational/Neuron files/NonRaftTestNav18channel2011stoch.hoc near line 96
^
Any ideads?

Thanks
Amber

Re: Error

Posted: Fri Apr 20, 2012 11:12 am
by ted
And you weren't using any kind of version control.
The model was working and then I added some code and it stopped working, even when I deleted the added code the error still kept coming up.
because you made some other change too, but forgot what it was, so you haven't undone it. Ah, for an ounce of version control . . .

Maybe if you comment out a bigger block of code, you'll have pruned the program back to the point where the error message disappears, and you can start adding pieces back, bit by bit, until it's working properly again.

If you're absolutely at your wit's end, you could zip up just enough hoc, ses, and mod files to allow me to reproduce the error message, and send it to me
ted dot carnevale at yale dot edu
so I can take a look at it and let you know what I find.

Re: Error

Posted: Mon Apr 23, 2012 6:01 am
by Amberuk
Thanks very much

Don't know why I couldn't see it, I was missing a }

Thanks again

Re: Error

Posted: Mon Apr 23, 2012 11:43 am
by ted
It is very common to perceive what one "knows to exist" rather than to see what actually exists. This is especially the case with brackets i.e. ( ), [ ], { }. Some text editors automatically highlight bracket pairs when the edit cursor touches either member of the pair, or even " " or ' '. Sometimes this feature is configurable and must be activated in order to make it work.