[fpc-pascal]blockread/write?

Anton Tichawa anton.tichawa at chello.at
Wed Mar 19 21:26:55 CET 2003


Hello, Preben!

Safety First!
	
On Wednesday 19 March 2003 16:04, you wrote:
>  Anton Tichawa wrote:
> > There are several other things too in this old procedure, that might
> > still cause errors or need optimization. If you want, I'll write a small
> > procedure that does the same, andor rewrite your procedure for
> > comparison. That'd be for God's Sake, I don't need no money or any other
> > thing.
>
> I ended up assuming that it could always read "count" records (except of
> course in the end) and implemented that. It seems to work fine now, but of
> course it is not safe as the documentation does not specifically state that
> it will always do it this way... My program now runs 35 times faster than
> before... :-)
>

Well, safety is still important. You should use the returned count in your 
procedure to be on the safe soide. The end might come sooner than expected.

So, to be on the safe side, for a little tradeoff, include the returned 
"count" value in your algorithm, which will make your program womewhat 
slower, but still faster than it was before.

Will you run the program somwhere in some safe environment? Because there 
might still be errors in it .. I didn't have the time yet to read it 
thouroughly.

Bye Anton.

----------

"Adas Methode war, wie sich zeigen wird, Tagträume in offenbar korrekte 
Berechnungen einzuweben."

Doris Langley Moore: Ada, Countess of Lovelace (London 1977).

----------

Anton Tichawa
Volkertstrasse 19 / 20
A-1020 Wien
mobil: +43 664 52 07 907
email: anton.tichawa at chello.at

----------



More information about the fpc-pascal mailing list