Overview
| Artifact ID: | c577d8373f8b44e2415dc9bd4a24a05e1d7287c5 |
|---|---|
| Ticket: | 9ca25bce1341913e910f612f13a64ac9cfea2598
There is no notion of local procedure inside a procedure |
| User & Date: | dkf on 2015-05-16 06:11:07 |
Changes
- assignee changed to: "dkf"
- closedate changed to: "2457158.75773043"
- closer changed to: "dkf"
- icomment:
<blockquote>They are not deleted when the function returns.</blockquote> This is correct, and there's <i>a lot of existing code</i> that relies on exactly this behaviour (so one can have procedures that create other permanent procedures) so it definitely won't be changing in the way that you ask for.<p>If you want procedure-like things that will be automatically deleted at the end, use lambda terms. That works well and they are almost as simple to use as procedures (just <tt>apply $term</tt> instead of the procedure name): <pre> proc foo {r s t} { set bar {{x y} { set z [expr {$x**2 + $y**3}] return [expr {17 * $z + 42}] }} set z "example $t" set abc [apply $bar $r $s]; #### <<<<<<<<<<<<< return [list $z $abc $z] } </pre> - login: "dkf"
- mimetype: "text/html"
- resolution changed to: "Wont Fix"
- status changed to: "Closed"
- subsystem changed to: "22. [proc] and [uplevel]"
- username: "dkf"