[Oberon] Mail.GetUIDLs

Aubrey.McIntosh at Alumni.UTexas.Net Aubrey.McIntosh at Alumni.UTexas.Net
Wed Jan 18 08:16:06 CET 2012


This code has the same interpretation under V4 or Component Pascal, so I
think my comment will be true for the ETH / PC Native.

A Text is not a sequence of bytes.  It is more abstract than a file is.  It
is a sequence of "Runs" where each run has attributes such as font, color,
length, and a source file and the starting position.

This structure makes it very fast to copy from one viewer to another.

When a Text is saved to a file, the separate runs are all written anew to
that file.  At that time it is very easy to confuse the concepts of Text
and File, so I always try to think of a text that is displayed in a viewer
after it has had items copied from other texts whenever I am writing code.

So, there has to be a file that is referenced in the Run data structure.
 In this code snippet, the new anonymous file is created to fill that role.


In Component Pascal, Converters all appear to contain code that looks
almost identical this.


On Tue, Jan 17, 2012 at 6:38 PM, <peasthope at shaw.ca> wrote:

> Hi,
>
> I'm working on a problem with POP mail retrieval which surfaced during
> the weekend.  This question refers to ETH Oberon / PC Native 05.01.2003.
> I haven't looked for the analogue in Aos but a similar concept must be
> there.
>
> According to my understanding, the purpose of GetUIDLs is to retrieve a
> list of message UIDLs from a POP server; one UIDL per message.
>
>        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?
>
> Thanks,                        ... Peter E.
>
>
> --
> Telephone 1 360 639 0202.  Former telephone 1 360 450 2132.
> bcc: peasthope ... shaw.ca
> "http://carnot.yi.org/"
> "http://members.shaw.ca/peasthope/index.html#Itinerary"
>
>
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon
>



-- 
Aubrey McIntosh, Ph.D.
1502 Devon Circle
Austin TX 78723-1814
http://home.grandecom.net/~amcintosh/aubrey/Search/
512-348-7401
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.inf.ethz.ch/pipermail/oberon/attachments/20120118/e5c57b42/attachment.html 


More information about the Oberon mailing list