SectionRef

classes
   sec            

SYNTAX

section sref = new SectionRef()

DESCRIPTION

SectionRef keeps a pointer/reference to a section The reference is to the currently accessed section at the time the object was created.

This class allows sections to be referenced as normal object variables for assignment and passing as arguments.


sec

SectionRef

SYNTAX

.sec

DESCRIPTION

special syntax that makes the reference the currently accessed section. This class allows sections to be referenced as normal object variables for assignment and passing as arguments. The usage is execute following example
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.


neuron/neuron/classes/secref.hel : Dec 19 1996