--_(re)
Tue, 29 Jul 1997 12:22:27 +0200 (MET DST)
According to Herbert Voss:
> [...]
> Var i : Real;
> Begin
> For i := 0 to 25 Do
> WriteLn;
> End;
Obviously, your version of GPC (2.0?) has a bug with type-checking
in `for' loops. Recent beta versions of GPC (available at
ftp://agnes.dida.physik.uni-essen.de/gnu-pascal/beta/) are
correct here and complain:
test.pas: In function `program_Test':
test.pas:7: `for' variable must be of ordinal type
> /usr/lib/crt1.o: In function start':
> /usr/lib/crt1.o(.text+0x5a): undefined reference to main'
This is what Borland Pascal would comment with "Cannot run a Unit".
Use `gpc -c foo.pas' if you only want to *compile* a Unit, not to
link it and produce an executable.
> Another problem comes, when I choosed the Type Byte for the variable i.
gpc-2.0 has no built-in `Byte' data type (recent beta versions have),
but you can use the definitions in the `BPcompat' package.
Hope this helps,
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer
peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201]
maintainer GNU Pascal [970714] - http://home.pages.de/~gnu-pascal/ [970125]
Peter Gerwinski (peter@agnes.dida.physik.uni-essen.de)
HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada -
Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es