[Oberon] exponential notation for REALs

Jörg joerg.straube at iaeth.ch
Thu Sep 20 15:23:27 CEST 2018


Delete the "+".
Jörg


-----Original Message-----
From: Oberon <oberon-bounces at lists.inf.ethz.ch> On Behalf Of Dieter
Sent: Thursday, September 20, 2018 2:38 PM
To: oberon at lists.inf.ethz.ch
Subject: [Oberon] exponential notation for REALs

PLease have a look at the example (ETHOberon on Windows):
=====================================================
MODULE testread;
IMPORT Strings,Out;
(* Test for reading REAL Numbers with exponential. *) PROCEDURE test*; VAR s
: ARRAY 20 OF CHAR; r : LONGREAL; BEGIN
     COPY ("5.02024D+007", s); Strings.StrToReal(s,r); Out.LongReal(r,15);
END test; BEGIN END testread.test

System.Free testread ~
===================================================
What ever I try, the exponential gets lost and the result is:
5.020240D+000
Has anybody got an explanation or a proposal how to read in Floating Point
numbers with exponential.

Regards, Dieter


--
Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
https://lists.inf.ethz.ch/mailman/listinfo/oberon



More information about the Oberon mailing list