TIP #188: ADD 'STRING IS WIDEINTEGER' TO THE 'STRING IS' SUBCOMMAND ===================================================================== Version: $Revision: 1.7 $ Author: Kevin Kenny State: Final Type: Project Tcl-Version: 8.5 Vote: Done Created: Friday, 23 April 2004 URL: https://tip.tcl-lang.org188.html Discussions-To: news:comp.lang.tcl Post-History: ------------------------------------------------------------------------- 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[]. COPYRIGHT =========== Copyright 2004, by Kevin B. Kenny. Redistribution permitted under the terms of the Open Publication License []. ------------------------------------------------------------------------- TIP AutoGenerator - written by Donal K. Fellows