[Oberon] System-V - Float to Alpha

Tomas Kral thomas.kral at email.cz
Mon Feb 4 13:04:42 CET 2019


On Mon, 4 Feb 2019 12:44:06 +0100
Jörg <joerg.straube at iaeth.ch> wrote:

>           d[i] := 0X; Out.String(d); Out.Ln; (* = debug output *)
>           DEC(i); D[j] := d[i]; D[j+1] := "."; INC(j, 2);
>           WHILE i > 0 DO DEC(i); D[j] := d[i]; INC(j) END; (*reverse*)

Hi Joerg,

Thank you.
Meanwhile recoded to this, and does things, your coding however seems
a way short. I somehow tend to linger on REPEAT where perhaps
WHILE is better.

 DEC(i); D[j] := d[i]; INC(j); D[j] := "."; DEC(i); INC(j); (*point after 1st digit*)
 REPEAT D[j] := d[i]; DEC(i); INC(j) UNTIL i < 0 ; (*reverse*)

-- 
Tomas Kral <thomas.kral at email.cz>


More information about the Oberon mailing list