Code Comments
Programming Forum and web based access to our favorite programming groups.TIP #214: ADD NEW OBJECT INTROSPECTION COMMAND ======================================== ======== Version: $Revision: 1.1 $ Author: <usus_at_aladyn.de> State: Draft Type: Project Tcl-Version: 8.5 Vote: Pending Created: Tuesday, 24 August 2004 URL: http://purl.org/tcl/tip/214.html WebEdit: http://purl.org/tcl/tip/edit/214 Post-History: ------------------------------------------------------------------------- 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 <URL:news:comp.lang.tcl> by Victor Wagner, I considered a facility to obtain the internal representation of a the value in variable to be useful. * It further completes 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 [<URL:http://sf.net/tracker/?func=detail&...p/tcl_announce/ Send administrivia to tcl-announce-request@mitchell.org Tcl/Tk at http://tcl.tk/ ]]
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.