Tcl Source Code

View Ticket
Login
Ticket UUID: 3024379
Title: Errors thrown by the expr command may give NONE as errorCode
Type: Bug Created on: 2010-07-02 13:55:28
Submitter: arjenmarkus Assigned to: dkf
Subsystem: 47. Bytecode Compiler Severity:
Priority: 5 Medium Last modified: 2010-07-03 03:59:19
Status: Closed Closed by: dkf
Resolution: Fixed Closed on: 2010-07-02 20:59:19
Version: obsolete: 8.5.8
Description:
Consider the following erroneous calls to expr:

expr {sqrt(-1)/2.0} and expr {sqrt(1/2.0}

The error messages are clear enough - a non-numeric floating point value in the first case and a missing parenthesis in the second.
In both cases however errorCode is NONE.

This makes it hard to distinguish domain errors and syntax errors 

Tcl version: 8.5.8
User Comments:
dkf added on 2010-07-03 03:39:00:
Fixed on HEAD

dkf added on 2010-07-03 03:59:19:

allow_comments - 1

Fixed on 8.5 branch.

Always now it's ARITH DOMAIN in the case you describe (since NaN isn't in the domain of *any* math operator!)