[Oberon] Program ? Texts.Replace(T, beg, end, Bufr);
Felix Friedrich
friedrich at gsf.de
Mon Aug 12 09:52:41 CEST 2002
At 23:08 09.08.2002 +0200, Friday, Chris wrote:
>I can't see how to use the facilities of Texts.Mod to
> Texts.Replace(T, beg, end, Bufr);
>because I can't see how to pre-load Bufr.
For good reasons the content of the buffer is hidden to the programmer. You
can create and fill a buffer using a Texts.Writer or use
Texts.Save (note also: Texts.Append, Texts.Insert, Texts.Copy, Texts.Recall)
example1(create a buffer by way of Texts.Writer) :
VAR w: Texts.Writer; buf: Texts.Buffer;
BEGIN
Texts.OpenWriter(w);
Texts.WriteString(w,"Teststring"); (* Write whatever you like *)
Texts.Replace(T,beg,end,w.buf);
END;
example2(create a buffer by way of Texts.Save):
VAR buf: Texts.Buffer;
BEGIN
Texts.OpenBuf(buf);
Texts.Save(othertext,beg,end,buf); (* take part of another text *)
Texts.Replace(T,beg,end,buf);
END;
does that answer your question?
kind regards, Felix.
--
Felix Friedrich
Institut für Biomathematik und Biometrie
GSF - Forschungszentrum für Umwelt und Gesundheit, GmbH
Ingolstädter Landstraße 1, D-85764 Neuherberg
Tel: ++49 89 3187 2436
email: friedrich at gsf.de
--
More information about the Oberon
mailing list