<i>There is no notion of local procedure inside a procedure</i> status still Open with 3 other changes
by
.
D 2015-04-18T05:11:43.580
J icomment My\snew\sapproach\sis\sthis:\r\n\s\s\s\sEach\svariable\sor\sprocedure\screated\sin\sthe\s::local\snamespace\sis\sautomatically\sdeleted\swhen\sa\sfunction\sreturns.\r\n\r\nInspired\sby\sthis\scode:\r\n\s\s\s\shttp://wiki.tcl.tk/997\r\n\r\n\r\n\sproc\slocal_procs\s{}\s{\r\n\s\s\s\snamespace\seval\s::local\s{}\r\n\r\n\s\s\s\suplevel\s1\s{\s\r\n\s\s\s\s\s\s\s\sset\s__[lindex\s[info\slevel\s0]\s0]\s\s{}\r\n\s\s\s\s\s\s\s\strace\svariable\s__[lindex\s[info\slevel\s0]\s0]\su\s{namespace\sdelete\s::local;}\r\n\r\n\s\s\s\s}\r\n\s}\r\n\r\n\r\nWith\sthis\snew\sapproach,\sI\shave\sto\swrite\slocal_procs\sat\sthe\sbegining\sof\seach\sproc.\sBut\sit\swould\sbe\snice\sif\sthis\shappens\sautomatically\sby\sthe\sinterpreter.
J login anonymous
J mimetype text/plain
K 9ca25bce1341913e910f612f13a64ac9cfea2598
U anonymous
Z 8378a8193ccbca9e1efbdc158152cf56