Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2005-09

Reading past end of file, no error

6 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Tom Verhoeff

I am pretty sure that FPC 1.0.10 would give a runtime error when attempting to read past the end of file.

E.g.

program ReadPastEOF;
var
  i: Integer;
begin
  readln(i);
  writeln(i);
  readln(i);
  writeln(i);
end.

when offered a file with just one line containing one integer, would give a runtime error. This is the behavior I would in fact expect.

At some point in the 1.9 branch, this changed (and now it bites me). Now it silently assigns 0 to i on the second read. Even with -Ci as option or {$I+}.

Can anyone comment on this?

Should I submit a bug report?

Tom

E-MAIL: T.Verhoeff @ TUE.NL | Fac. of Math. & Computing Science PHONE: +31 40 247 41 25 | Eindhoven University of Technology FAX: +31 40 247 54 04 | PO Box 513, NL-5600 MB Eindhoven http://www.win.tue.nl/~wstomv/ | The Netherlands

Reply by email

Jonas Maebe
to Tom Verhoeff
Tom Verhoeff wrote
At some point in the 1.9 branch, this changed (and now it bites me). Now it silently assigns 0 to i on the second read. Even with -Ci as option or {$I+}.

This was a bug in 2.0 which has been fixed for 2.0.1 already.

Jonas

Reply by email

Tom Verhoeff
to Jonas Maebe
Jonas Maebe wrote 8 lines
On 07 Sep 2005, at 17:13, Tom Verhoeff wrote: >At some point in the 1.9 branch, this changed (and now it bites me). >Now it silently assigns 0 to i on the second read. Even with -Ci as >option or {$I+}. This was a bug in 2.0 which has been fixed for 2.0.1 already.

It is still in 2.0.1 [2005/06/01] for i386, which does have a fix for another problem at the end of a file (viz. reading when the last line is not terminated by an eoln marker).

Tom

E-MAIL: T.Verhoeff @ TUE.NL | Fac. of Math. & Computing Science PHONE: +31 40 247 41 25 | Eindhoven University of Technology FAX: +31 40 247 54 04 | PO Box 513, NL-5600 MB Eindhoven http://www.win.tue.nl/~wstomv/ | The Netherlands

Reply by email

Roberto Della Pasqua
to Tom Verhoeff

Hi kind users,

I like ask how is the status of FPC64 under linux.

About:
- reliability (can be used to build 24x365 system tcp daemons?)
- speed (how perform the executable code)
- rtl (is good or we need call directly libc for every thing?)

Does somebody has very positive experience in FPC64 to show here?

Finally, very thank you anyway.

Roberto

Reply by email

Florian Klaempfl
to Roberto Della Pasqua
Roberto Della Pasqua wrote
Hi kind users, I like ask how is the status of FPC64 under linux.

I can tell you what's the developer's opinion.

About: - reliability (can be used to build 24x365 system tcp daemons?)

I think so, as long as you don't depend on seldomly used parts of the FCL.

- speed (how perform the executable code)

Reasonable.

- rtl (is good or we need call directly libc for every thing?)

The rtl works good.

Show quoted text 10 lines
Does somebody has very positive experience in FPC64 to show here? Finally, very thank you anyway. Roberto _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Tom Verhoeff
to Tom Verhoeff: It is still in 2.0.1 [2005/06/01] for i386, which does have a fix for another problem at…
Tom Verhoeff wrote 13 lines
On Wed, Sep 07, 2005 at 07:12:37PM +0200, Jonas Maebe wrote: > > On 07 Sep 2005, at 17:13, Tom Verhoeff wrote: > > >At some point in the 1.9 branch, this changed (and now it bites me). > >Now it silently assigns 0 to i on the second read. Even with -Ci as > >option or {$I+}. > > This was a bug in 2.0 which has been fixed for 2.0.1 already. It is still in 2.0.1 [2005/06/01] for i386, which does have a fix for another problem at the end of a file (viz. reading when the last line is not terminated by an eoln marker).

We downloaded the latest snapshot from svn:

Free Pascal Compiler version 2.0.1 [2005/09/09] for i386

and it still does not give the expected runtime error. I will submit a bug report.

Tom

E-MAIL: T.Verhoeff @ TUE.NL | Fac. of Math. & Computing Science PHONE: +31 40 247 41 25 | Eindhoven University of Technology FAX: +31 40 247 54 04 | PO Box 513, NL-5600 MB Eindhoven http://www.win.tue.nl/~wstomv/ | The Netherlands

Reply by email