Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c1b3653deba85f5bb5a28a9160ba7dab35085f75
Ticket: 2927535fffffffffffffffffffffffffffffffff
Retrieve last result in interactive mode
User & Date: avl42 on 2010-01-08 18:20:52
Changes

  1. 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!
    
    
    
  2. login: "avl42"
  3. mimetype: "text/plain"
  4. username: "avl42"