From Newsgroup: comp.lang.tcl
On 01/09/2025 22:12, et99 wrote:
The string is integer command returns true if the string would be
accepted as an integer in tcl8/9 source code. It is not, (as I read the manual) intended to be used to verify the character class of a string
for "integer-ness".
A little clarification on the expression above: It's documented here in `string(3Tcl)` to be for testing the character class, but also "integer"
is thereby incorrectly characterised (pun not intended) as a character
class for strings that are valid tcl integers.
An improvement to the man page `string(3Tcl)` might be to make the
following changes:
"Returns 1 if string is a valid member of the specified character class"
to "Returns 1 if string may be validated by the named validator". I hope
that would provide accurate terminology and parsimony as long as
"validator" isn't already a term of art in the Tcl world.
prepend characterising labels to each named validator's synopsis such as [character class], [atom], etc... for orientation with external conventions.
A few other adjustments might be required to match the correction of terminology.
--
Tristan Wibberley
--- Synchronet 3.21a-Linux NewsLink 1.2