Page 1 of 1

List all variables

Posted: Thu Aug 30, 2012 4:05 pm
by JimH
The following seems like it should be obvious, but I haven't been able to find it anywhere. How do I list all currently defined variables in the hoc interpreter?

Thanks,
Jim

Re: List all variables

Posted: Thu Aug 30, 2012 4:46 pm
by ted
In the list of hoc functions
http://www.neuron.yale.edu/neuron/stati ... #functions
please note
allobjects
allobjectvars
name_declared

Too bad symbols no longer works. However, if you create a graph, its "Plot what?" tool can be used to explore the potential name space.

Generally when I need to discover whether a name is already in use as a variable, I just type it at the oc> prompt and see whether the result is an "undefined variable" message, or grep for it in the relevant hoc source code. If I need to know the names of all procs, funcs, or objrefs, I just grep the file(s) of interest for proc, func, or objref.