Page 1 of 1

Re: Two basic questions. Thanks

Posted: Sat Mar 03, 2007 10:38 am
by ted
Dong Xu wrote:1. What does $o1 mean?
does it mean the first parameter in a func, as an object or a string?
$ means it's an argument
o means it's an object reference
1 means it's the first argument
More information about arguments is in the Programmer's Reference here
http://www.neuron.yale.edu/neuron/stati ... #arguments
General hoc syntax is discussed in this section of the Programmer's Reference
http://www.neuron.yale.edu/neuron/stati ... tml#syntax
2. what does & mean?
for example in

Code: Select all

section netcon = new NetCon(&v(x), target)
From the documentation of arguments in the Programmer's Reference:
"If the calling statement has a '&' prepended to the variable then it is passed by reference . . . "
but you should read the entire documentation of arguments.