[Oberon] Mail.GetUIDLs

Alexander Iljin ajsoft at yandex.ru
Wed Jan 18 07:08:46 CET 2012


Hello!

>         PROCEDURE GetUIDLs(S: NetTools.Session; VAR T: Texts.Text);
>                 VAR
>                         F: Files.File;
>                         R: Files.Rider;
>         BEGIN
>                 SendCmd(S, "UIDL", "");
>                 IF ReadState(S) THEN
>                         F := Files.New(""); Files.Set(R, F, 0);
>                         ReadText(S, R);
>                         NEW(T); Texts.LoadAscii(T, F)
>                 ELSE
>                         T := NIL
>                 END
>         END GetUIDLs;
>
> Files.New("") creates an anonymous file.  What becomes of this file when
> GetUIDLs exits?  Why is the file involved rather than the data from Session
> put directly into T?

  The anonymous file will be garbage-collected at a later time.
  I would guess that Texts.LoadAscii contains some important data conversion, e.g. it may ensure that there are no garbage characters, etc. One has to look at the procedure to find out.

---=====---
 Alexander



More information about the Oberon mailing list