Page 1 of 1

Starting number of a base

Posted: Sun Dec 08, 2013 5:50 am
by scienbox
I like to confirm one thing I recently tested.

Should the number of a base start from [0], not [1]?
When I just used 'spine[1]' without using 'spine' or 'spine[0]', a following error was caused.
---
/Applications/NEURON-7.3/nrn/x86_64/bin/nrniv: subscript out of range spine
in test2.hoc
---

Is this right?
Thank you very much! :D

Best,
TK

Re: Starting number of a base

Posted: Mon Dec 09, 2013 11:49 am
by ted
Indices start at 0, just as in C.

Re: Starting number of a base

Posted: Mon Dec 09, 2013 7:52 pm
by scienbox
Okay. Thank you very much! :D