<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE TIP SYSTEM "http://tcl.activestate.com/cgi-bin/tct/tip/tipxml.dtd">
<!-- Converted at Wed May 16 19:58:06 GMT 2012 -->
<!-- TIP AutoGenerator - written by Donal K. Fellows -->

<TIP number='188'>
<header><title>Add &apos;string is wideinteger&apos; to the &apos;string is&apos; Subcommand</title><author address="mailto:kennykb@acm.org">Kevin Kenny</author><status type='project' state='final' tclversion="8.5" vote='after'>$Revision: 1.7 $</status><history></history><created day='23' month='apr' year='2004' /><discussions url='news:comp.lang.tcl'/><keyword>Tcl</keyword></header>
<abstract>The <emph style="bold">string</emph> command supports tests for a number of Tcl&apos;s basic types, for example, integers, doubles, and booleans. This TIP proposes adding wide integers.</abstract>
<body><section title="Rationale">
<para>The <emph style="bold">string</emph> command includes tests for the common Tcl types: <emph style="bold">string is boolean</emph>, <emph style="bold">string is double</emph> and <emph style="bold">string is integer</emph>. Unaccountably, <emph style="bold">string is wideinteger</emph> is missing from the list, making it difficult for an input validation procedure to determine whether, in fact, a string contains a valid wide integer.</para>
</section>
<section title="Specification">
<para>This document proposes augmenting the <emph style="bold">string is</emph> command with a <emph style="bold">string is wideinteger</emph> that functions the same as <emph style="bold">string is integer</emph> in every respect except for the fact that it accepts any string containing a substring that is valid as a wide integer (that is, acceptable to <emph style="italic">Tcl_GetWideIntFromObj</emph>) possibly surrounded by whitespace.</para>
</section>
<section title="Reference Implementation">
<para>Patches that implement <emph style="bold">string is wideinteger</emph>, provide test cases for it, and update <emph style="italic">doc/string.n</emph> to include it are available at SourceForge as Tcl Patch #940915[<url ref="http://sf.net/tracker/?func=detail&amp;atid=310894&amp;aid=940915&amp;group_id=10894"/>].</para>
</section>
<section title="Copyright">
<para>Copyright 2004, by Kevin B. Kenny. Redistribution permitted under the terms of the Open Publication License [<url ref="http://www.opencontent.org/openpub/"/>].</para>
</section>
</body></TIP>

