: <i>There is no notion of local procedure inside a procedure</i> plus 9 other changes
by
.
D 2015-05-16T06:11:07.909
J assignee dkf
J closedate 2457158.75773043
J closer dkf
J icomment <blockquote>They\sare\snot\sdeleted\swhen\sthe\sfunction\sreturns.</blockquote>\r\nThis\sis\scorrect,\sand\sthere's\s<i>a\slot\sof\sexisting\scode</i>\sthat\srelies\son\sexactly\sthis\sbehaviour\s(so\sone\scan\shave\sprocedures\sthat\screate\sother\spermanent\sprocedures)\sso\sit\sdefinitely\swon't\sbe\schanging\sin\sthe\sway\sthat\syou\sask\sfor.<p>If\syou\swant\sprocedure-like\sthings\sthat\swill\sbe\sautomatically\sdeleted\sat\sthe\send,\suse\slambda\sterms.\sThat\sworks\swell\sand\sthey\sare\salmost\sas\ssimple\sto\suse\sas\sprocedures\s(just\s<tt>apply\s$term</tt>\sinstead\sof\sthe\sprocedure\sname):\r\n<pre>\r\nproc\sfoo\s{r\ss\st}\s{\r\n\s\s\s\sset\sbar\s{{x\sy}\s{\r\n\s\s\s\s\s\s\s\sset\sz\s[expr\s{$x**2\s+\s$y**3}]\r\n\s\s\s\s\s\s\s\sreturn\s[expr\s{17\s*\s$z\s+\s42}]\r\n\s\s\s\s}}\r\n\s\s\s\sset\sz\s"example\s$t"\r\n\s\s\s\sset\sabc\s[apply\s$bar\s$r\s$s];\s\s\s\s####\s<<<<<<<<<<<<<\r\n\s\s\s\sreturn\s[list\s$z\s$abc\s$z]\r\n}\r\n</pre>
J login dkf
J mimetype text/html
J resolution Wont\sFix
J status Closed
J subsystem 22.\s[proc]\sand\s[uplevel]
J username dkf
K 9ca25bce1341913e910f612f13a64ac9cfea2598
U dkf
Z d62fcc29c8181c012070045a8b795615