Overview
| Artifact ID: | c1b3653deba85f5bb5a28a9160ba7dab35085f75 |
|---|---|
| Ticket: | 2927535fffffffffffffffffffffffffffffffff
Retrieve last result in interactive mode |
| User & Date: | avl42 on 2010-01-08 18:20:52 |
Changes
- icomment:
I agree to dkf, that a short-named global variable would be nicer. (my preference would be for "$_") A command (especially in ::tcl namespace) may misguide people into believing that it was a tcl-feature rather than one of tclsh. (I'm not aware of any tclsh-specific commands so far, but argv and argv0 are already precedents for tclsh's own preinitialized variables.) No magic is necessary for that variable apart from that it is overwritten after each eval'ed command. e.g. puts "[set _ 42] $_" would print twice 42, and afterwards $_ would be empty for puts' result. Thanks for taking the effort in the first place! It's appreciated!
- login: "avl42"
- mimetype: "text/plain"
- username: "avl42"