[Oberon] Procedure variables and local procedures
Jörg
joerg.straube at iaeth.ch
Sat Sep 30 02:33:16 CEST 2017
Chris
> VAR b : BYTE; i : INTEGER;
> i := 1000; b := i;
>
> Does it trap for overflow?
The compiler does not generate a trap. It moves the lowest byte of i to b. See first IF in ORG.Store.
> Btw. another issue I see with Oberon-07 ist the removal of dynamic
> arrays. I cannot imagine how to write for example a string library or
> something like that without.
Would you please explain „dynamic arrays“? Do you miss the low level SYSTEM.NEW(p, n)?
The modules handling dynamic structures (eg. text editor, network stack or files) do in principle use the same internal scheme: they use chains of blocks of fixed size.
If you used internally UTF-8 to represent a character of an international string,, you would need another method for character access than a simple s[10]
br
Jörg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20170930/4ecf9187/attachment-0001.html>
More information about the Oberon
mailing list