manually check receiver for beeing >= 0 under WINDOWS
authorClaus Gittinger <cg@exept.de>
Thu, 22 Oct 1998 20:13:36 +0200
changeset 3889 3466554b639f
parent 3888 a528db31e5c0
child 3890 a024811ed304
manually check receiver for beeing >= 0 under WINDOWS (avoid popup dialog with borlands library)
Float.st
--- a/Float.st	Wed Oct 21 22:53:10 1998 +0200
+++ b/Float.st	Thu Oct 22 20:13:36 1998 +0200
@@ -1142,14 +1142,19 @@
     double rslt;
     OBJ newFloat;
 
-    errno = 0;
-    rslt = sqrt(__floatVal(self));
+#ifdef WIN32
+    if (__floatVal(self) >= 0.0)
+#endif
+    {
+        errno = 0;
+        rslt = sqrt(__floatVal(self));
 #ifdef LINUX /* and maybe others */
-    if (! isnan(rslt))
+        if (! isnan(rslt))
 #endif
-    if (errno == 0) {
-        __qMKFLOAT(newFloat, rslt);
-        RETURN ( newFloat );
+        if (errno == 0) {
+            __qMKFLOAT(newFloat, rslt);
+            RETURN ( newFloat );
+        }
     }
 %}.
     ^ self class
@@ -1785,6 +1790,6 @@
 !Float class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Float.st,v 1.85 1998-07-09 08:07:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Float.st,v 1.86 1998-10-22 18:13:36 cg Exp $'
 ! !
 Float initialize!