summaryrefslogtreecommitdiffstats
path: root/generic/tclMathOp.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2006-12-07 15:02:41 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2006-12-07 15:02:41 (GMT)
commit13181f107dff6f47161fb25bc780155172c1c112 (patch)
treebc20024d94b451fd855e3e1ddfa17d0e696e7b8c /generic/tclMathOp.c
parent5b55ad0b4c4e728a329e350bdc05bf2a8aa0d906 (diff)
downloadtcl-13181f107dff6f47161fb25bc780155172c1c112.zip
tcl-13181f107dff6f47161fb25bc780155172c1c112.tar.gz
tcl-13181f107dff6f47161fb25bc780155172c1c112.tar.bz2
More #174 bits and pieces
Diffstat (limited to 'generic/tclMathOp.c')
-rw-r--r--generic/tclMathOp.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tclMathOp.c b/generic/tclMathOp.c
index 1a1ebe9..375a546 100644
--- a/generic/tclMathOp.c
+++ b/generic/tclMathOp.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclMathOp.c,v 1.2 2006/12/01 14:31:19 dgp Exp $
+ * RCS: @(#) $Id: tclMathOp.c,v 1.3 2006/12/07 15:02:46 dkf Exp $
*/
#include "tclInt.h"
@@ -1066,6 +1066,15 @@ TclInvertOpCmd(
return TCL_ERROR;
}
switch (type) {
+ case TCL_NUMBER_NAN:
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "can't use %s as operand of \"~\"",
+ "non-numeric floating-point value"));
+ return TCL_ERROR;
+ case TCL_NUMBER_DOUBLE:
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "can't use %s as operand of \"~\"", "floating-point value"));
+ return TCL_ERROR;
case TCL_NUMBER_LONG: {
long l = *((const long *) val);