Code: Select all
begintemplate grr
proc init() {
load_file("mytest.hoc")
}
endtemplate grr
objref mycell
mycell = new grr()
quit()
Code: Select all
create soma[5]
for i = 0, 4 soma[i] {
print i
}
print soma[0].L
Code: Select all
0
1
2
3
4
100
Code: Select all
begintemplate grr
proc init() {
create soma[5]
for i = 0, 4 soma[i] {
print i
}
print soma[0].L
}
endtemplate grr
objref mycell
mycell = new grr()
quit()
Code: Select all
/home/casem/neuron/nrn/x86_64/bin/nrniv: soma not an array variable
in testy.hoc near line 6
for i = 0, 4 soma[i] {
^