[Oberon] In.Real not working

Duke Normandin dukeofpurl at gmx.com
Fri Apr 9 20:38:45 CEST 2021


On Fri, 09 Apr 2021 19:30:58 +0100
dave at brownsmeet.com wrote:

> The implementation of In.Real is indeed faulty in Vishaps oberon.
>
> David Lightfoot is on to something: In.Open will work around the
> problem, but you have to call In.Open before In.Real() every time.
>
> What is happening is:
>
>    .  In.Int is reading the integer digits OK
>    .  The next thing in the input buffer is the newline character from
>       the carriage return key
>    .  In.Real is not coded to skip over newline, so it finds no digits
>       and returns zero
>    .  Calling In.Open resets the input buffer and thus discards the
>       unwanted newline character.
>
> Vishaps In.Real needs a bit more work to conform to the Oakwood
> guidelines.

Thanks for clearing that up! Would the OBNC compiler be the one to use to avoid this and maybe other issues?
--
Duke Normandin <dukeofpurl at gmx.com>


More information about the Oberon mailing list