### [STRINGISINT]
Unlike Tcl 8, the `string is integer` command will accept integers
that do not fit in 32-bits. Furthermore, the command will accept and
ignore `_` as a separator within numeric strings. Therefore any use
of the command should be checked that it is not used as a 32-bit range
check or for validation where the string should be strictly numeric.
What commands should be used for validating strictly numeric ?
Alternatively, what commands are recommended for conversion from not-strictly numeric values like 1_234_2 to the embedded numeric, i.e. 12342 ?
On the general side, links to the relevant TIP(s) would be nice to have.
Unfortunately does not say if scan would accept the extended number. Will have to check/experiment.
From the example I might be able use set x [expr $x] to get to the strict value.
The relevant code which triggered the issue is
if {[string is integer -strict $value]} {
if {($min eq {}) || ($value < $min)} { set min $value }
if {($max eq {}) || ($value > $max)} { set max $value }
[...]
and thinking about what parts of the core are now able to handle the non-strict numbers.
help currently says
What commands should be used for validating strictly numeric ?
Alternatively, what commands are recommended for conversion from not-strictly numeric values like
1_234_2
to the embedded numeric, i.e.12342
?On the general side, links to the relevant TIP(s) would be nice to have.
For
STRINGISINT
it looks to be 551Unfortunately does not say if
scan
would accept the extended number. Will have to check/experiment. From the example I might be able useset x [expr $x]
to get to the strict value.The relevant code which triggered the issue is
and thinking about what parts of the core are now able to handle the non-strict numbers.