This is not necessarily the current version of this TIP.
|Title:||Align 'string is ...' to Type-Conversion Functions in 'expr'|
|Version:||$Revision: 1.7 $|
|Author:||Jos Decoster <jos dot decoster at gmail dot com>|
|Created:||Monday, 09 February 2009|
The string command supports tests for a number of Tcl's basic types, for example, integers, doubles, and booleans. The tcl::mathfunc mathematical functions provides sevaral functions to limit the number of bits used in integer numbers. This TIP proposes to align both groups of functions for int, long, wide and entier.
The string command includes tests for the common Tcl types: string is boolean, string is double and string is integer. Some of the integer ranges used in Tcl internals are missing from the list, making it difficult for an input validation procedure to determine whether, in fact, a string contains a valid integer number to be used for that specific Tcl command.
Ranges already present are:
Missing ranges are:
The ::tcl::mathfunc mathematical functions provides sevaral functions to limit the number of bits used in integer numbers. Some of the integer ranges used in Tcl internals are missing from the list, and other check an unexpected range.
Functions already present are:
Functions already present but with unexpected behavior are:
int actually does a long conversion
Missing functions are:
Providing a string is function for every integer range used in Tcl internals will make it possible to check every argument in input validation procedures before call