[Oberon] Understanding ORS.Mod.txt

John R. Strohm strohm at airmail.net
Mon Jun 13 05:17:56 CEST 2016


Ten(n) calculates 10**n, using optimized continued multiplication.

You are confusing the local variable x inside function Ten with the variable 
x in the caller of Ten.

-----Original Message----- 
From: Chris Burrows
Sent: Sunday, June 12, 2016 5:52 PM
To: 'ETH Oberon and related systems'
Subject: Re: [Oberon] Understanding ORS.Mod.txt

> -----Original Message-----
> From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
> Srinivas Nayak
> Sent: Monday, 13 June 2016 1:04 AM
> To: ETH Oberon and related systems
> Subject: Re: [Oberon] Understanding ORS.Mod.txt
>
> While returning, we should multiply x to t resulting 100000.
>
> Please correct me.
>

The multiplication you are looking for is done, after returning, by the
caller. E.g. in ORS.Number:

x := Ten(e) * x

Regards,
Chris Burrows
CFB Softfware
http://www.astrobe.com


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


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



More information about the Oberon mailing list