[fpc-devel]Two small issues

Tom Verhoeff wstomv at win.tue.nl
Tue Oct 9 20:22:47 CEST 2001


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




More information about the fpc-devel mailing list