[Oberon] Re (2): Updating a Text in a Gadget.
peter at easthope.ca
peter at easthope.ca
Fri Nov 29 19:46:07 CET 2019
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
More information about the Oberon
mailing list