[Oberon] Re (2): Module aliases - what is the correct way to handle them
joerg.straube at iaeth.ch
Mon Jul 13 18:42:58 CEST 2020
Compare an Oberon text file to a Word doc file:
It’s more than just a bunch of ASCII chars.
HTML or XML files are basically a bunch of ASCII characters. The whole formatting stuff is written with intermingled commands coded in ASCII like <H1>Header</H1>
One of the little nasty things of ASCII files is the line ending: every OS defines its own way for a line ending
- Windows and DOS: CR+LF
- Unix: LF
- Oberon and macOS before X: CR)
This is the reason, why moving ASCII files from OS to OS can be cumbersome.
In Oberon text files and Word doc files the line ending and bold font, color and size of a text is coded binary instead of intermingled ASCII command.
Texts.Mod supports converting ASCII -> Text right out of the box, just open the ASCII file. The opposite (storing Text as plain ASCII and losing all fornatting) can be done by writing a (simple) procedure StoreAscii along these lines
f: = Files.New(name); Files.Set(out, f, 0);
Texts.OpenReader(in, t, 0); Texts.Read(in, ch);
WHILE ~in.eot DO
IF ch = CR THEN (* Oberon line ending *)
IF windows THEN Files.Write(out, CR) END;
ch := LF
Files.Write(out, ch); Texts.Read(in, ch)
> Am 13.07.2020 um 16:34 schrieb peter at easthope.ca:
> From: Joerg <joerg.straube at iaeth.ch>
> Date: Mon, 13 Jul 2020 15:27:10 +0200
>> Although you didn=E2=80=98t ask me, here another method to switch output: Li=
>> nzOberon offers the =E2=80=9Eversion elements=E2=80=9C (http://www.ssw.uni-l=
>> The elems extension to Texts.Mod (needed by version elems) is not ported to P=
>> rojectOberon (yet?)
> OK, thanks.
> Text is straightforward for a student learning computer science or IT
> systematically. Subtle for self-instruction.
> I don't question that Text is more efficient than HTML or XML or Word
> to express a document. Moving a document represented as Text, from an
> Oberon system to a Unix-like or Windows system is more difficult than
> moving TXT or HTML or XML. Converting HTML & etc. to Text is also
> non-trivial. Therefore I have to agree with Bernhard T. that Text has
> been a deterrent for some who might pursue Oberon for practical use.
> A "devils-advocate" must ask whether more use of HTML and XML rather
> than Text might facilitate progress. The XML configuration in A2 is an
> example. Another example: Oberon.Text maintained as plain ASCII
> works; color is lost but transport is gained.
> Regards, ... P.
> Tel: +1 604 670 0140 Bcc: peter at easthope. ca
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
More information about the Oberon