#DOCUMENTATION by exept
class: LimitedPrecisionReal
comment/format in: #printStringScientific
--- a/LimitedPrecisionReal.st Sat Nov 23 19:35:42 2019 +0100
+++ b/LimitedPrecisionReal.st Sun Nov 24 10:27:45 2019 +0100
@@ -1308,7 +1308,8 @@
printStringScientific
"return a 'user friendly' scientific printString.
- Notice: this returns a Text object with emphasis.
+ Notice: this returns a Text object with superscript digits,
+ which requires a font capapble of displaying it correctly.
Also: the returned string is not meant to be read back - purely for GUIs"
|s idx|
@@ -1319,8 +1320,9 @@
^ (s copyTo:idx-1) , '×10' , ((s copyFrom:idx+1) asText emphasisAllAdd:#superscript)
"
- 1.23e14 printStringScientific
- 1.23456 printStringScientific
+ 1.23456 printString -> '1.23456'
+ 1.23456 printStringScientific 1.23456×100 (with superscript zero at end)
+ 1.23e14 printStringScientific 1.23×1014
PrintfScanf printf:'%e' argument:1.23456
"