[Oberon] FPGA - Files.ReadBytes(), Files.WriteBytes()
Tomas Kral
thomas.kral at email.cz
Mon Aug 20 11:16:55 CEST 2018
Hi,
Files.Mod has procedures for reading/writing a block of bytes, bytewise.
PROCEDURE ReadBytes*(VAR r: Rider; VAR x: ARRAY OF BYTE; n: INTEGER);
VAR i: INTEGER;
BEGIN i := 0; (*this implementation is to be improved*)
WHILE i < n DO ReadByte(r, x[i]); INC(i) END
END ReadBytes;
PROCEDURE WriteBytes*(VAR r: Rider; x: ARRAY OF BYTE; n: INTEGER);
VAR i: INTEGER;
BEGIN i := 0; (*this implementation is to be improed*)
WHILE i < n DO WriteByte(r, x[i]); INC(i) END
END WriteBytes;
The comment suggests improving the code further. Any hints to improve
the code?
Thanks
--
Tomas Kral <thomas.kral at email.cz>
More information about the Oberon
mailing list