reset bis
Original Reporter info from Mantis: FPCCore
-
Reporter name: FPC core team
Original Reporter info from Mantis: FPCCore
- Reporter name: FPC core team
Description:
Hello
please, now see this program (continue bug 2009)
--------------------------
uses Crt,Dos;
procedure Read_File(nomefile:string);
var F: file;
begin
Assign(F,nomefile);
{$i-}
reset(f,1);
{$i+}
write(ioresult); { output is 5 : BAD it work in winME}
{if IOResult<>0 then;}
end;
begin
writeln;writeln;
writeln(filemode);
Read_File('z:\rar.exe'); { file in CD-ROM Driver ! out is 5 }
writeln;
Read_File('c:#\rar.exe'); { file in HD , out is 0 , OK }
end.
-----------
I run the program in more OS and compiler,
the output is:
win2000 : bp7 200 go32V2 250 win32 250
winME : bp7 200 go32V2 200 win32 200
win98SE : bp7 200 go32V2 200 win32 200
win95B : bp7 200 go32V2 200 win32 200
dos 7.10 : bp7 200 go32V2 200 not exist
(ps: the real output xyz numbers is:
x
y
z
)
You tell me:
"It seems there's a bug in WinME if it doesn't generate an error."
Are you sure?
with the filemode:=0 it work ... but, only win2000 is correct for you?
it is strange!
there is a bug in all other Win OS and in BP7 ?
please a answer :-)
Additional information:
Reporter: Salvatore Licciardi
EMail: turylicciardi at tiscalinet dot it
Mantis conversion info:
- Mantis ID: 4096
- OS: All
- Version: 1.0.6
- Fixed in version: N/A