Mega Code Archive
Bug in Delphi 3
Title: Bug in Delphi 3
Question: Blockread and Write with file of text
Answer:
Check this code out:
var s1,ss,s2:string[50];
f :file of string[50];
begin
assignfile(f,'bugg.str');
Rewrite(f);
ss:='Missing something?';
Blockwrite (f,ss,1);
Blockwrite (f,'Missing something?',1);
seek (f,Filepos(f)-2);
BlockRead(f,s2,1);
BlockRead (f,s1,1);
.......
(put here something to view s1 and s2)
end;
Well the intereting here is that s1 and s2 differ, hence
Blockwrite wrtites in different way ss and 'Missing something?'
I don't know if this bug is patched in later versions.
Please let me know if you make some conclusions.
gang@stz.orbitel.b