[Oberon] Newlines and Carriage-Returns

Charles Perkins chuck at kuracali.com
Sat Jan 5 23:28:16 CET 2019


Thanks Andreas, that is better and I have updated the technote. It is
strange that the file on Project Oberon lost the change.  I see that it is
there in an older archive on my hard drive.

On Sat, Jan 5, 2019 at 12:52 PM Andreas Pirklbauer <
andreas_pirklbauer at yahoo.com> wrote:

>    > If anyone is curious it can be found at:
>    > https://github.com/io-core/technotes/blob/master/technote001.md
>    >
>    > Texts.Mod
>    >   in PROCEDURE Scan use  WHILE (ch = " ") OR (ch = TAB) OR (ch = NL)
> OR (ch = CR) DO
>    >   in PROCEDURE Scan use  IF (ch = NL) OR (ch = CR) THEN INC(S.line)
> END ;
>
> For procedure Texts.Scan it is actually slightly better to use the
> following code for the WHILE loop instead:
>
>      WHILE ~S.eot & (ch <= " ") DO
>
> Reason: This code will *not* hang the system if an EOT is encountered in
> the file before any of
> the characters in the WHILE condition.. for example with a file which
> consists *just* of an EOT.
>
> This “bug” was already fixed at one point at www.projectoberon.com, but
> now the old version is back.
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20190105/5129855b/attachment.html>


More information about the Oberon mailing list