Hi, ORG.Open reserve seven places ( address 1 to 7) at beginning of code file but I can't find in Oberon07 compiler when that addresses are used. Someone know from where can I find documentation about ? -- Walter Daniel Gallegos Programmable Logic Consultoría, Diseño, Entrenamiento.
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
Delete the "+". Jörg -----Original Message----- From: Oberon <oberon-bounces@lists.inf.ethz.ch> On Behalf Of Dieter Sent: Thursday, September 20, 2018 2:38 PM To: oberon@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@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
Thanks, Jörg! It works, but I do not find this very logical. The developer of Module Strings could have spent 5 Minutes on this feature. Regards, Dieter Am 20.09.2018 um 15:23 schrieb Jörg:
Delete the "+". Jörg
-----Original Message----- From: Oberon <oberon-bounces@lists.inf.ethz.ch> On Behalf Of Dieter Sent: Thursday, September 20, 2018 2:38 PM To: oberon@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@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
You‘re right. It‘s only one IF more. You could modify Strings.StrToReal yourself if you want... have fun Jörg
Am 20.09.2018 um 16:14 schrieb Dieter <d.gloetzel@web.de>:
Thanks, Jörg!
It works, but I do not find this very logical.
The developer of Module Strings could have spent 5 Minutes on this feature.
Regards, Dieter
Am 20.09.2018 um 15:23 schrieb Jörg: Delete the "+". Jörg
-----Original Message----- From: Oberon <oberon-bounces@lists.inf.ethz.ch> On Behalf Of Dieter Sent: Thursday, September 20, 2018 2:38 PM To: oberon@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@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
Am 19.09.2018 um 18:26 schrieb Walter Gallegos:
Hi,
ORG.Open reserve seven places ( address 1 to 7) at beginning of code file but I can't find in Oberon07 compiler when that addresses are used.
Someone know from where can I find documentation about ?
It reserves 8 words only when ORP.version=0, this is being used for the bootloader only. I suppose to pass some constants. Peter
If I remember correctly, in RISC-0 the IO adresses were down there instead of at the end of the memory address space. Jörg
Am 20.09.2018 um 21:14 schrieb Peter Matthias <PeterMatthias@web.de>:
Am 19.09.2018 um 18:26 schrieb Walter Gallegos: Hi, ORG.Open reserve seven places ( address 1 to 7) at beginning of code file but I can't find in Oberon07 compiler when that addresses are used. Someone know from where can I find documentation about ?
It reserves 8 words only when ORP.version=0, this is being used for the bootloader only. I suppose to pass some constants.
Peter -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
participants (5)
-
Dieter -
Jörg -
Jörg Straube -
Peter Matthias -
Walter Gallegos