TCL. How to check if procedure exists? -
i need check if procedure func1
exists , result (if exists 1
if not 0
) put in variable proc_ststus_var
. how can it?
info procs ?pattern?
give basic building block want:
% proc foo {} {} % info procs foo foo % info procs bar %
something like:
% proc procexists p { return uplevel 1 [expr {[llength [info procs $p]] > 0}] } % procexists foo 1 % procexists bar 0
Comments
Post a Comment