UnitConverter.st
changeset 3142 48b98b6c1822
parent 3141 d789144feb2f
child 3457 bb6ea4a7909c
--- a/UnitConverter.st	Tue Dec 17 16:54:17 2013 +0100
+++ b/UnitConverter.st	Tue Dec 17 16:58:58 2013 +0100
@@ -835,6 +835,14 @@
                 ] ifFalse:[
                     scaleChar = $t ifTrue:[
                         scale := 1024 * 1024 * 1024 * 1024
+                    ] ifFalse:[
+                        scaleChar = $p ifTrue:[
+                            scale := 1024 * 1024 * 1024 * 1024 * 1024
+                        ] ifFalse:[
+                            scaleChar = $e ifTrue:[
+                                scale := 1024 * 1024 * 1024 * 1024 * 1024 * 1024
+                            ]
+                        ]
                     ]
                 ]
             ]
@@ -849,7 +857,11 @@
      self fileSizeFromString:'1.8 M'            
      self fileSizeFromString:'0.5 G'            
      self fileSizeFromString:'0.5 T'            
+     self fileSizeFromString:'0.5 P'            
+     self fileSizeFromString:'0.5 E'            
     "
+
+    "Modified (comment): / 17-12-2013 / 16:56:56 / cg"
 !
 
 fileSizeStringFor:nBytes
@@ -880,8 +892,13 @@
         ]
     ] ifFalse:[
         nBytes >= (1000 * 1024 * 1024 * 1024 * 1024) ifTrue:[
-            n := (nBytes / (1024 * 1024) / (1024 * 1024) / 1024) asFixedPoint:1.
-            unitString := ' P'
+            nBytes >= (1000 * 1024 * 1024 * 1024 * 1024 * 1024) ifTrue:[
+                n := (nBytes / (1024 * 1024) / (1024 * 1024) / (1024 * 1024)) asFixedPoint:1.
+                unitString := ' E'
+            ] ifFalse:[
+                n := (nBytes / (1024 * 1024) / (1024 * 1024) / 1024) asFixedPoint:1.
+                unitString := ' P'
+            ]
         ] ifFalse:[
             n := (nBytes / (1024 * 1024) / (1024 * 1024)) asFixedPoint:1.
             unitString := ' T'
@@ -909,9 +926,11 @@
      self fileSizeStringFor:1000000000000      
      self fileSizeStringFor:10000000000000      
      self fileSizeStringFor:10000000000000000      
+     self fileSizeStringFor:100000000000000000000      
+     self fileSizeStringFor:1000000000000000000000      
     "
 
-    "Modified (comment): / 17-12-2013 / 16:53:23 / cg"
+    "Modified: / 17-12-2013 / 16:55:17 / cg"
 !
 
 frequencyFromString:frequencyString
@@ -1139,10 +1158,10 @@
 !UnitConverter class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/UnitConverter.st,v 1.43 2013-12-17 15:54:17 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/UnitConverter.st,v 1.44 2013-12-17 15:58:58 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic2/UnitConverter.st,v 1.43 2013-12-17 15:54:17 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/UnitConverter.st,v 1.44 2013-12-17 15:58:58 cg Exp $'
 ! !