Skip to content
Tcl Source Code View Ticket
Login

View Ticket

[string is double -strict] versus [expr int()]

Open1510060fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 20 years ago
Descriptionplain2006-06-21 15:41:11
My code looks like this:

    if {[string is double -strict $x]} {
      set y [expr {int($x)}]
    }

This causes an error in the int($x) expression
when $x had a value of NaN.

I'm not sure what ought to be done about this.
I just want to record the problem so that I
don't forget about.
dkf Ticket [1510060fff]: 2 changes [History diff]2006-06-22 14:53:06
dgp Ticket [1510060fff]: 1 change [History diff]2006-11-23 03:23:52
Log in (anonymous is fine) to add a comment.