[Oberon] Re (2): Updating a Text in a Gadget.

Jörg joerg.straube at iaeth.ch
Sat Nov 30 15:48:39 CET 2019


In Oberon systems programmed by NW, „id“ determines what kind of update it is.
In Oberon systems programmed by JG (e.g. S3), „len" is used as follows;
- len=0 —> delete from beg to end
- beg=end —> insert len at beg
- beg#end —> replace beg til end by len

br
Jörg

> Am 29.11.2019 um 19:47 schrieb peter at easthope.ca:
> 
> From:    Joerg <joerg.straube at iaeth.ch>
> Date:    Wed, 27 Nov 2019 19:28:58 +0100
>> Please have a look at chapter 5 (and especially chapter 5.3) of this Oberon Guide:
>> https://inf.ethz.ch/personal/wirth/ProjectOberon/PO.System.pdf
> 
> Thanks.  I've reviewed that and the parallel section in the earlier edition.
> 
> 1992, 2005 edition, chapter 5, Text.
> 
> "Update Msg = RECORD (Display.FrameMsg)
> id: INTEGER;
> text: Texts.Text;
> beg, end: LONGINT
> END;
> 
> Field id names one of the operators replace, insert, or delete. The 
> remaining fields text, beg, and end restrict the change to a range."
> 
> 2013 edition
> 
> "UpdateMsg = RECORD (Display.FrameMsg)
> id: INTEGER;
> text: Texts.Text;
> beg, end: INTEGER
> END;"
> 
> Source in A2O (A2, Oberon subsystem).
> 
> "UpdateMsg* = RECORD (Display.FrameMsg)
>   (** Message broadcast to indicate that part of a text changed. *)
> text*: Text;    (** The text that changed. *)
> beg*, end*, len*: LONGINT    (** Change location. *)
> END;"
> 
> The need for begin and end is understandable.  If a small segment of a 
> large Text is revised, there is no point in updating the whole Text.
> The segment to update is specified by begin and end.
> 
> I'm trying to understand len, which is in A2O and probably in S3; not 
> in Oberon. A simple assumption is len = end - beg.  No; there's more 
> to it than that. I've glanced at a calculation involving beg, end and 
> len but not made sense of it yet.  The explanation might be obvious to 
> others or might be explained in the Mueller thesis.  Haven't checked 
> there yet.
> 
> Any idea appreciated, thanks,              ... Lyall E.
> 
> -- 
> https://en.wikibooks.org/wiki/Medical_Machines
> Tel: +1 604 670 0140            Bcc: peter at easthope. ca
> 
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon


More information about the Oberon mailing list