classes sec
section sref = new SectionRef()This class allows sections to be referenced as normal object variables for assignment and passing as arguments.
SectionRef
.sec
create soma, axon
axon.diam=2
soma.diam=10
access axon
objref s1, s2
soma s1 = new SectionRef() // s1 holds a reference to the soma
print s1.sec.diam // print the diameter of the soma
s2 = s1 // s2 also holds a reference to the soma
s2.sec { psection() } // print all info about soma
axon s2 = new SectionRef()
proc c() {
$o1.sec connect $o2.sec(0), 1
}
c(s1, s2)
topology()
This last is a procedure that takes two SectionRef args and
connects them end to end.