[Oberon] Copy a text buffer to a string?

Paul Reed paulreed at paddedcell.com
Fri May 12 11:18:23 CEST 2023

> Am 11.05.2023 um 22:12 schrieb peter at easthope.ca: ...
>>          Oberon.GetClock(t,d); (* Ref. Oberon.Oberon.Mod *)
>>          WritePair(W, ":", t MOD 64);
>>          SendCmd(S,"Date:", W.buf);
>> With SendCmd requiring an ARRAY OF CHAR rather than Text buffer in the
>> third parameter, that fails.  What alternatives are appropriate?
On 2023-05-11 21:47, Michael Schierl wrote:
> ... you'd have to append the Text buffer to a Text, create a
> sufficiently large char array and use a Reader to read the text back
> into the array in a loop.

I agree. Not that hard in practice, but also note the writer W seems to 
be in Oberon.Mail.Mod ostensibly for logging, so it would be an abuse of 
that variable.

Even though Oberon.Mail.Mod, Oberon.NetTools.Mod and 
Oberon.NetSystem.Mod all import Texts, the latter doesn't provide a 
Texts.XXX-based interface for net data, presumably because the 
Display.Broadcast-on-update mechanism was thought inappropriate for this 
kind of data - it would never be used to update a viewer on the screen, 
for example, except for logging.


More information about the Oberon mailing list