diff options
| author | donal.k.fellows@manchester.ac.uk <dkf> | 2006-12-07 15:02:41 (GMT) |
|---|---|---|
| committer | donal.k.fellows@manchester.ac.uk <dkf> | 2006-12-07 15:02:41 (GMT) |
| commit | 344dfbd0fc12bc987a1ea3a5d0716fbaefcee49b (patch) | |
| tree | bc20024d94b451fd855e3e1ddfa17d0e696e7b8c /generic/tclMathOp.c | |
| parent | 034a9470949609bd55e1f4e3ffb071de9e691aeb (diff) | |
| download | tcl-344dfbd0fc12bc987a1ea3a5d0716fbaefcee49b.zip tcl-344dfbd0fc12bc987a1ea3a5d0716fbaefcee49b.tar.gz tcl-344dfbd0fc12bc987a1ea3a5d0716fbaefcee49b.tar.bz2 | |
More #174 bits and pieces
Diffstat (limited to 'generic/tclMathOp.c')
| -rw-r--r-- | generic/tclMathOp.c | 11 |
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); |
