[Oberon] System.Directory options

Andreas Pirklbauer andreas_pirklbauer at yahoo.com
Sun Oct 22 18:30:36 CEST 2017


>> If you do "System.Directory *.mod!" and after that without "!" than you 
> get details on both outputs. "!" toggles the details for output without "!". 

The issue is that System.Directory modifies a global variable ‘pat’,
which may contain some “leftover” characters from a previous call to
System.Directory. The following code makes sure it is always “clean”.

In System.Directory change this code:

  WHILE ch > "!" DO pat[i] := ch; INC(i); Texts.Read(R, ch) END;
  pat[i] := 0X;
  IF ch = "!" THEN pat[i+1] := "!" END ; (*directory option*)

to the following:

 WHILE ch > "!" DO pat[i] := ch; INC(i); Texts.Read(R, ch) END;
 pat[i] := 0X; INC(i);
 IF ch = "!" THEN pat[i] := "!"; INC(i) END ; (*directory option*)
 WHILE i < LEN(pat) DO pat[i] := 0X; INC(i) END ;

-AP



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20171022/c6354da5/attachment.html>


More information about the Oberon mailing list