[Oberon] exponential notation for REALs

Dieter d.gloetzel at web.de
Thu Sep 20 14:37:45 CEST 2018


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




More information about the Oberon mailing list