functions
ivoc_style("name", "attribute")
// 7 decimal places in value field editors. Must be done prior to any panel. ivoc_style("*xvalue_format", "%.7g") // large fonts in unix. Takes effect on next panel. ivoc_style("*font", "*helvetica-medium-r-normal*--24*") ivoc_style("*MenuBar*font", "*helvetica-medium-r-normal*--24*") ivoc_style("*MenuItem*font", "*helvetica-medium-r-normal*--24*")
functions
variable_domain(&variable, lower_limit, upper_limit)
variable_domain("varname", lower_limit, upper_limit)
This function is most useful when a variable makes sense only as a non-negative or positive number.
One can specify different domains only on a per name basis. Thus there is only one domain specification for L and one for all the instances of IClamp.amp but one can have a different specification for IClamp.amp and VClamp.amp .
functions
chdir("path")
functions
string = getcwd()
functions
current_units = units(&variable)
current_units = units(&variable, "units string")
"on or off" = units(1 or 0)
current_units = units("varname", ["units string"])
The units display may be turned off with units(0)
or by setting the
*units_on_flag: off
in the nrn/lib/nrn.defaults file.
units(&variable)
returns the units string for any
variable for which an address can be taken.
units(&variable, "units string")
sets the units for the indicated
variable.
If the first arg is a string, it is treated as the name of the variable. This is restricted to hoc variable names of the style, "name", or "classname.name". Apart from the circumstance that the string arg style must be used when executed from Python, a benefit is that it can be used when an instance does not exist (no pointer to a variable of that type). If there are no units specified for the variable name, or the variable name is not defined, the return value is the empty string.
units(&t) // built in as "ms" units("t") units("ExpSyn.g") // built in as "uS" x = 1 {units(&x, "mA/cm2")} // declare units for variable x units(&x) // prints mA/cm2 proc p () { xpanel("Panel") xvalue("t") xvalue("prompt for x", "x", 1) xpanel() } p() //shows units in panel units(0) // turn off units p() // does not show units in panel
functions
execerror("message1", "message2")