TIP #188: Add 'string is wideinteger' to the 'string is' Subcommand
_____________________________________________________________________________
TIP:	188
Title:	Add 'string is wideinteger' to the 'string is' Subcommand
Version:	$Revision: 1.7 $
Authors:	Kevin Kenny <kennykb@acm.org>
State:	Final
Type:	Project
Tcl-Version:	8.5
Vote:	Done
Created:	Fri Apr 23 00:00:00 UTC 2004
Keywords:	Tcl
Abstract
The string command supports tests for a number of Tcl's basic types, for example, integers, doubles, and booleans. This TIP proposes adding wide integers.
Rationale
The string command includes tests for the common Tcl types: string is boolean, string is double and string is integer. Unaccountably, string is wideinteger 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.
Specification
This document proposes augmenting the string is command with a string is wideinteger that functions the same as string is integer 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 Tcl_GetWideIntFromObj) possibly surrounded by whitespace.
Reference Implementation
Patches that implement string is wideinteger, provide test cases for it, and update doc/string.n to include it are available at SourceForge as Tcl Patch #940915[http://sf.net/tracker/?func=detail&atid=310894&aid=940915&group_id=10894].
Copyright
Copyright 2004, by Kevin B. Kenny. Redistribution permitted under the terms of the Open Publication License [http://www.opencontent.org/openpub/].
_____________________________________________________________________________
Colophon
TIP AutoGenerator - written by Donal K. Fellows