|Title:||Add 'string is wideinteger' to the 'string is' Subcommand|
|Version:||$Revision: 1.7 $|
|Author:||Kevin Kenny <kennykb at acm dot org>|
|Created:||Friday, 23 April 2004|
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.
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.
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.
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.
Copyright 2004, by Kevin B. Kenny. Redistribution permitted under the terms of the Open Publication License .
[Index] [History] [HTML Format] [Source Format] [LaTeX Format] [Text Format] [XML Format] [*roff Format (experimental)] [RTF Format (experimental)]TIP AutoGenerator - written by Donal K. Fellows