forall for (x) print secname(), x forall for (x) if (x > 0 && x < 1) print secname(), x //leave out 0 area nodes
begintemplate Temp public str, obj, x strdef str objref obj x = 0 endtemplate Temp objref temp temp = new Temp() temp.x = 2 temp.str = "hello" temp.obj = new SectionList() print temp, temp.x, temp.str, temp.obj
begintemplate P public flush, plot, begin, view_count objref this proc flush() { print this, "flush", t } proc plot() { print this, "plot", t } proc begin() { print this, "begin", t } func view_count() { print this, "view_count" return 1} endtemplate P flush_list.append(new P()) // call flush every step graphList[0].append(new P()) // call plot and flush every step
begintemplate String public s strdef s proc init() { if (numarg() == 1) { s = $s1 } } endtemplate String objref sobj[5] for i=0, 4 sobj[i] = new String() for i=0, 4 sprint(sobj[i].s, "Number %d", i) for i=0, 4 print sobj[i].s
hoc_obj_.c.printf
hoc_obj_.c.deriv(1,1).printf
hoc_obj_.c.deriv(1,1).indvwhere(">", 1e-5).printf
hoc_obj_.ind(hoc_obj_.c.deriv(1,1).indvwhere(">", 1e-5).add(1)).printf
hoc_obj_[1].ind(hoc_obj_.c.deriv(1,1).indvwhere(">", 1e-5).add(1)).deriv(1,1).printf
The following aren't hoc idioms, but they can be helpful.
These EMACS commands work for command line editing
from the console (MSWin: NEURON's interpreter window).
^P     previous line (up arrow may also work; this crude history function can be applied repeatedly to scroll through prior commands)
^A     front of line
^E     end of line
^B     backward character
^F     forward character
Long command lines can be constructed by revision + accretion
(recall a prior line, make changes and add new stuff to it).