functions
0 = print_session(useprinter, "name")
0 = print_session(useprinter, "name", useselected)
0 = print_session()
If useprinter==1 postscript is piped to the filter given by "name" which should be able to deal with standard input (UNIX). If useprinter==0 the postscript is saved in the file specified by "name".
If there is a third arg equal to 1 then the printed windows are those selected and arranged on the paper icon of the PWM and calling this function is equivalent to pressing the Print button. Otherwise all printable windows are printed in landscape mode with a size such that the screen fits on the paper.
If there are no arguments then all the windows are printed in way that works for mac, mswin, and unix.
functions
0 = save_session("filename")
0 = save_session("filename", "header")
functionsPrints the form of the matrix defined by eqn statements. Each nonzero element is printed as an "*".
functionsDoes one iteration of the non-linear system defined by eqn statements. Returns the linear norm of the differece between left and right hand sides plus the change in the dependent variables.
functionsThrows away previous dependent variable and equation specifications from eqn statements.
functions
sprint(strdef, "format", args)
functions
x = strcmp("string1", "string2")
functionsInitializes a stopwatch with a resolution of 1 second. See stopsw .
functionsReturns the time since the stopwatch was last initialized with a startsw .
startsw() for i=1,1000000 { x = sin(.2) ] stopsw()
functions
object_id(objref)
object_id(objref, 1)
If the second argument is 1, it returns the index of the object name. Returns -1 if the object is the NULLObject.
functions
allobjectvars()
functions
allobjects()
allobjects("templatename")
nref = allobjects(objectref)
With a templatename the list is restricted to objects of that class.
With an object variable, nothing is printed but the reference count is returned. The count is too large by one if the argument was of the form templatename[index] since a temporary reference is created while the object is on the stack during the call.
functions
n = numarg()
functions
hoc_pointer_(&variable)
functions
execute("statement")
execute("statement", objref)
functions
err = execute1("statement")
err = execute1("statement", objref)
err = execute1("statement", show_err_mes)
err = execute1("statement", objref, show_err_mes
If the show_err_mes arg is present and equal to 0 then the normal interpreter error message printing is turned off for the scope of the statement.
Error messages can be turned on even inside the statement with show_errmess_always .
Parse and execute the command in the context of the object. If second arg not present then execute it at the top level of the interpreter.
Here, outside_var is unavailable from within the object and so a command is constructed which can be executed at the top level where that variable is available and sets the public var in the object.sprint(cmd, "%s.var = outside_var", this) execute1(cmd)
functions
load_proc("name1", ...)
load_func("name1", ...)
load_template("name1", ..._
For each name in the list all the *.oc and *.hoc files will be searched and the first file that contains the appropriate proc, func, or begintemplate will be loaded. Loading only takes place if the name has not previously been defined. The search path consists of the current working directory, followed by the paths in the environment variable HOC_LIBRARY_PATH (space separated), followed by $NEURONHOME/lib/hoc. Remember that only entire files are loaded-- not just the definition of the name. And nothing is loaded if the name is already defined. Inadvertant recursion will use up all the file descriptors. For efficiency, on the first load, all the names are cached in a temporary file and the file is scanned on subsequent loads for that session.
xopen("$(NEURONHOME)/lib/hoc/noload.hoc")
functions
load_file("filename")
load_file("filename", "name")
load_file(0or1, "filename")
The functionality is identical to xopen except that the xopen takes place only if if a file of that name has not already been loaded with the load_file, load_proc , load_template , or load_func functions. The file is searched for in the current working directory, $HOC_LIBRARY_PATH (a colon or space separated list of directories), and $NEURONHOME/lib/hoc directories (in that order) for the file if there is no directory prefix. Before doing the xopen on the file the current working directory is temporarily changed to the directory containing the file so that it can xopen files relative to its location.
If the second string arg exists, the file is xopen'ed only if the name is not defined as a variable AND the file has not been loaded with load_file. This is useful in those cases where the package was first xopen'ed without going through the load_file function.
If the first arg is a number and is 1, then the file is loaded again even if it has already been loaded.
functionssee load_proc
functionssee load_proc
functions
strdef name
machine_name(name)
functionsNot completely implemented at this time. Saves all commands executed by the interpreter.
functionsNot completely implemented at this time. See saveaudit .
functions
coredump_on_error(1 or 0)
functionsExits the program. Can be used as the action of a button. If edit buffers are open you will be asked if you wish to save them before the final exit.
functions
object_push(objref)
functions
object_pop()
functions
show_errmess_always(boolean)
functions
type = name_declared("name")
If the name exists return
2 if an objref .
3 if a Section
4 if a strdef
5 if a scalar or double variable.
1 otherwise
Note that names can be (re)delared only if they do not already exist or are already of the same type. This is too useful to require the user to waste an objref in creating a StringFunctions class to use is_name