c***@gmail.com
2008-12-28 15:01:43 UTC
Hi All,
It is not easy to find programming manual for Pascal on the
internet.
I am trying to open a file to read, and detect if there is an error
in file operations, for example 'file does not exist'.
The following code was taken from freepascal's manual, however it
does not work:
fn := paramstr (1);
Assign (source, fn); Reset (source);
if IOResult<>0 then
begin writeln ('File ', fn,' doesn't exist.'); halt; end;
As the program attempts to read a file that does not exist, runtime
error occurs:
Runtime error 2 at $08066E68
$08066E68
$0805E7B4
$0806D681
I am currently using freepascal.
any help?
thanks a lot.
tony
It is not easy to find programming manual for Pascal on the
internet.
I am trying to open a file to read, and detect if there is an error
in file operations, for example 'file does not exist'.
The following code was taken from freepascal's manual, however it
does not work:
fn := paramstr (1);
Assign (source, fn); Reset (source);
if IOResult<>0 then
begin writeln ('File ', fn,' doesn't exist.'); halt; end;
As the program attempts to read a file that does not exist, runtime
error occurs:
Runtime error 2 at $08066E68
$08066E68
$0805E7B4
$0806D681
I am currently using freepascal.
any help?
thanks a lot.
tony