| Ulrich Schöbel 2004-08-31, 4:01 pm |
|
TIP #214: ADD NEW OBJECT INTROSPECTION COMMAND
========================================
========
Version: $Revision: 1.1 $
Author: Ulrich Schöbel <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&...&group_id=10894>].
COPYRIGHT
===========
This document has been placed in the public domain.
-------------------------------------------------------------------------
TIP AutoGenerator - written by Donal K. Fellows
[[Send Tcl/Tk announcements to tcl-announce@mitchell.org
Announcements archived at http://groups.yahoo.com/group/tcl_announce/
Send administrivia to tcl-announce-request@mitchell.org
Tcl/Tk at http://tcl.tk/ ]]
|