Hi Peter,
Sanity check: Did you export or perhaps only set the environment variable? With `bash', the difference is
GPC_EXEC_PREFIX=/gpc/usr/local/lib/gcc-lib/mips-sgi-irix6.2/2.8.1 #
wrong
vs. export GPC_EXEC_PREFIX=/gpc/usr/local/lib/gcc-lib/mips-sgi-irix6.2/2.8.1
# correct
First I've set them only via ...=..., but under a cshell, where no export works. with bash, I can export them (export shows the correct values), but only with
gpc -B ... -L ... test.pas
it runs now :-))) Thank you very much
I've got some problems with porting programs from borland to gpc. E.g. in the online-manual
http://agnes.dida.physik.uni-essen.de/~gnu-pascal/gpc_5.html#SEC71
is listed, that with
gpc --borland-pascal
maxint and maxlongint will be predefined. But they aren't. What's wrong?
Thanks in advance
Oliver
-- Oliver Puetz Tel.: 0234-700-2982 Lehrstuhl fuer Fluidenergiemaschinen Fax.: 0234-7094-358 Ruhr-Universitaet Bochum, Universitaetsstr. 150, 44801 Bochum opuetz@fem.ruhr-uni-bochum.de Gebaeude IB 4/141 www.ruhr-uni-bochum.de/www-public/volgmwbr/mitarb/puetz.htm
Oliver Puetz wrote:
I've got some problems with porting programs from borland to gpc. E.g. in the online-manual
http://agnes.dida.physik.uni-essen.de/~gnu-pascal/gpc_5.html#SEC71
is listed, that with
gpc --borland-pascal
maxint and maxlongint will be predefined. But they aren't. What's wrong?
`MaxInt' is defined with or without `--borland-pascal'.
The `--borland-pascal' switch does not enable anything, but it tells GPC to warn about the use of extensions (or some Standard Pascal features) not present in Borland Pascal, thus trying to ensure that your program will still be compilable with BP. The directive does also switch off warnings about certain ugly tricks (like misuse of typed constants as initialized variables) that are inavoidable in Borland-Pascal.
For `MaxLongInt' you are right, it is not predefined indeed. It is defined in the `GPC' unit as `High ( LongInt )':
Program Test;
uses GPC; (* `MaxLongInt' is defined here *)
Const MaxLongestWord = High ( LongestWord );
begin writeln ( MaxInt ); writeln ( MaxLongInt ); writeln ( MaxLongestWord ); end.
On my Linux PC, the output is:
2147483647 9223372036854775807 18446744073709551615
On 64-bit machines, these numbers are higher ... :-)
Hope this helps - and thanks for finding the bug in the documentation -
Peter
Wait a sec Folks,
Frank found a bug in GCC 2.8 and upward under IRIX. The writeln is broken due to this bug. Is it a good idea to put energy into GPC when GCC is faulty? Do I miss something?
miklos