On Mon, 15 Dec 2003, Tom Jackson wrote:
> On Mon, 2003-12-15 at 19:59, Dossy wrote:
> > if {[string is integer " $var"]} {
> > ... do something ...
> > }
>
> Interesting shortcut. I wonder why the empty string returns true for
> every class. With the -scrict switch " 1" is also true, so strict
> doesn't really add much except returning 0 for the empty string.
I seem to recall reading once on comp.lang.tcl that [string is] returns
true to make certain Tk bindings simpler. Such as:
entry .e -validatecommand "string is integer %P"
Michael
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of
your email blank.