#FEATURE
authorStefan Vogel <sv@exept.de>
Mon, 14 Mar 2016 18:43:51 +0100
changeset 19360 5b112fdb68be
parent 19359 43b079b6245c
child 19361 650e52cb3ec8
#FEATURE class: LongFloat changed: #fromInteger:
LongFloat.st
--- a/LongFloat.st	Mon Mar 14 18:43:06 2016 +0100
+++ b/LongFloat.st	Mon Mar 14 18:43:51 2016 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1999 by eXept Software AG
 	      All Rights Reserved
@@ -414,21 +412,20 @@
 !
 
 fromInteger:anInteger
-    "return a new longFloat, given a float value"
+    "return a new longFloat, given an integer value"
 
 %{  /* NOCONTEXT */
 #ifdef __SCHTEAM__
     if (anInteger.isSmallInteger()) {
-	return __c__._RETURN( STDouble._new( (double)(anInteger.longValue()) ));
+        return __c__._RETURN( STDouble._new( (double)(anInteger.longValue()) ));
     }
 #else
     OBJ newFloat;
-    LONGFLOAT f;
 
     if (__isSmallInteger(anInteger)) {
-	f = (LONGFLOAT)(__smallIntegerVal(anInteger));
-	__qMKLFLOAT(newFloat, f);   /* OBJECT ALLOCATION */
-	RETURN (newFloat);
+        LONGFLOAT f = (LONGFLOAT)__smallIntegerVal(anInteger);
+        __qMKLFLOAT(newFloat, f);   /* OBJECT ALLOCATION */
+        RETURN (newFloat);
     }
 #endif /* not SCHTEAM */
 %}.
@@ -437,7 +434,7 @@
     "
      LongFloat fromInteger:123
      LongFloat fromInteger:(100 factorial)
-     (100 factorial) asFloat
+     (100 factorial) asLongFloat
     "
 !