[Oberon] two technical questions
oberon at moravcik.info
Thu Feb 6 12:23:44 CET 2014
have 2 questions regarding active oberon:
1. I suppose built-in procedure AWAIT( some condition ) checks
periodically if condition is not met. What is the checking time period?
Can I change it?
2. What is the proper way to write/read whole RECORDs to file at once
through Streams.Writer Streams.Reader ?
I tried this but it generates exceptions:
something = RECORD
a : ARRAY 30 OF CHAR;
b : LONGINT;
ArrayOfChar = POINTER TO ARRAY OF CHAR;
writer : Streams.Writer;
reader : Streams.Reader;
s : something;
b : ArrayOfChar;
... want to write and read s to file
b := SYSTEM.VAL(ArrayOfChar, ADDRESSOF(s) );
writer.Bytes( b^, 0, SIZEOF(something) );
... and then
reader.Bytes( b^, 0, SIZEOF(something) );
More information about the Oberon