TIP #214: ADD NEW OBJECT INTROSPECTION COMMAND ================================================ Version: $Revision: 1.7 $ Author: Ulrich Schöbel Larry W. Virden State: Withdrawn Type: Project Tcl-Version: 8.7 Vote: Pending Created: Tuesday, 24 August 2004 URL: https://tip.tcl-lang.org214.html Post-History: Obsoletes: TIP #117 ------------------------------------------------------------------------- ABSTRACT ========== This TIP proposes the new *representation* subcommand to *info* which returns the internal representation of a variable's contents. RATIONALE =========== Inspired by a posting on by Victor Wagner, I considered a facility to obtain the internal representation of the value of a variable to be useful. * It further extends the Tcl introspection commands. * It offers a method to check the type of a variable without conversion. * During the development process it is useful to detect/avoid shimmering and its negative performance effects. PROPOSED CHANGE ================= Add the new subcommand *info representation* with the following syntax: *info representation* /varName/ It returns the type of the variable /varName/ or an error, if * /varName/ doesn't exist, * /varName/ is an array and no index is provided, * /varName/ is a scalar variable but an index is provided. IMPLEMENTATION ================ A patch against Tcl8.4.6 is available []. COPYRIGHT =========== This document has been placed in the public domain. ------------------------------------------------------------------------- TIP AutoGenerator - written by Donal K. Fellows