Sign in Join

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

Mailing lists / fpc-devel / 2001-10

Two small issues

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Tom Verhoeff

We recently started using FreePascal in our first-year education for Computing Science at Eindhoven University of Technology.

Students use Delphi on their laptops to develop Pascal programs. They submit their programs through PEACH for evaluation and grading. For more information about PEACH (our Programming Education And Contest Hosting system [under development(TM)]) see:

http://peach.win.tue.nl/

PEACH uses FreePascal, in Delphi mode, to compile Pascal programs in a Linux environment (after that the programs are executed for some test data and the output is then checked).

Some minor issues have surfaced and I would like to report them here.

1. Delphi accepts empty parameter lists with parentheses:

        procedure p ( );
          begin ... end;
      FreePascal in Delphi mode does NOT.  (So I tell my students not
      to use them in Delphi.  Empty parameter lists are not standard
      Pascal anyway.  Still, this is somewhat annoying.)
  2.  In FreePascal (as in Delphi), Int64 is a built-in 64-bit
      integer type.  According to the FreePascal documentation Int64
      is an ordinal type.  However, a for-loop over an Int64 is refused:
program forint64;
var
  i: Int64;
begin
  for i := 1 to 10 do begin
    write ( '*' )
  end { for i }
; writeln
end.

Compiling (with -Sd) yields:

forint64.p(8,7) Error: Ordinal expression expected

Best regards,

Tom Verhoeff

Reply by email

Marco van de Voort
to Tom Verhoeff
Show quoted text 6 lines
Some minor issues have surfaced and I would like to report them here. 1. Delphi accepts empty parameter lists with parentheses: procedure p ( ); begin ... end;

Seems to be fixed in 1.1, but I think this is fixable in 1.0.x too?

2. In FreePascal (as in Delphi), Int64 is a built-in 64-bit integer type. According to the FreePascal documentation Int64 is an ordinal type. However, a for-loop over an Int64 is refused:

This still doesn't work in my (02/08, I don't use windows that often atm) 1.1

Since the 64bit type handling was rewritten in 1.1, I assume this is not easily fixable in 1.0.x?

Reply by email