\documentclass[]{article}
\usepackage{amsmath,graphicx,supertabular,hyperref,tabularx,ifthen}
\title{TIP \#214: Add New Object Introspection Command}
\date{August 24, 2004}
\author{Ulrich Schöbel, Larry W. Virden}
\urlstyle{sf}
\setlength{\parskip}{1ex}
\setlength{\parindent}{0pt}
\def\tipversion$#1${\texttt{\$#1\$}}
\def\tiplangle#1{\ensuremath{<}}
\def\tiprangle#1{\ensuremath{>}}
\def\tipbar#1{\ensuremath{|}}
\def\tipmail#1#2{\(\langle\){\small\expandafter\url{#1@#2}}\(\rangle\)}
\ifx\pdfoutput\undefined
\newcommand{\tipimage}[2]{\typeout{Make sure you download #1.eps}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.eps}}{\includegraphics[width=0.8\textwidth]{#1.eps}}}
\newcommand{\tipxref}[1]{}
\newcommand{\tipxrefend}{}
\else
\newcommand{\tipimage}[2]{\typeout{Make sure you create #1.pdf}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.pdf}}{\includegraphics[width=0.8\textwidth]{#1.pdf}}}
\pdfcatalog{/PageMode /UseOutlines}
\newcommand{\tipxref}[1]{\pdfannotlink attr {/C [0.5 0.5 1.0] /Border [0 0 1]} goto name {#1}}
\newcommand{\tipxrefend}{\pdfendlink}
\fi
\newenvironment{tipabstract}{\begin{abstract}}{\end{abstract}}
\begin{document}\maketitle
\begin{center}\begin{tabularx}{\linewidth}{|r@{: }X|}\hline
\textbf{TIP \#214}&\textbf{Add New Object Introspection Command}\\\hline
Author&

Ulrich Schöbel \tipmail{usus}{aladyn.de}
\par
Larry W. Virden \tipmail{lvirden}{yahoo.com}
\\
Created&Tuesday, \(\text{24}^{\text{th}}\) August 2004\\
Type&Project\\
Tcl Version&\(8.7\)\\
State&Withdrawn\\
Vote&Pending\\
Version&\tipversion$Revision: 1.7 $\\
Keywords&Tcl, info, representation\\
Obsoletes&117\\
Post History&\\
\hline\end{tabularx}\end{center}
\thispagestyle{empty}\pagestyle{empty}
\begin{tipabstract}

This TIP proposes the new \textbf{representation} subcommand to \textbf{info} which returns the internal representation of a variable's contents.
\end{tipabstract}
\tableofcontents\setcounter{page}{0}\clearpage\pagestyle{plain}

\section{Rationale}

Inspired by a posting on \url{news:comp.lang.tcl} by Victor Wagner, I considered a facility to obtain the internal representation of the value of a variable to be useful.
\begin{itemize}
\item{}
It further extends the Tcl introspection commands.
\item{}
It offers a method to check the type of a variable without conversion.
\item{}
During the development process it is useful to detect/avoid shimmering and its negative performance effects.
\end{itemize}

\section{Proposed Change}

Add the new subcommand \textbf{info representation} with the following syntax:

\begin{quote}
\textbf{info representation} \textit{varName}
\end{quote}

It returns the type of the variable \textit{varName} or an error, if
\begin{itemize}
\item{}
\textit{varName} doesn't exist,
\item{}
\textit{varName} is an array and no index is provided,
\item{}
\textit{varName} is a scalar variable but an index is provided.
\end{itemize}

\section{Implementation}

A patch against Tcl8.4.6 is available [\url{http://sf.net/support/tracker.php?aid=1015338}].

\section{Copyright}

This document has been placed in the public domain.

\section{Colophon}

\textit{TIP AutoGenerator --- written by Donal K. Fellows}
\end{document}
