Oliver Puetz wrote:
outputs
0.000 0.000
but it should be
10.000 10.000
gpc without any parameters reports
Integers and strings will be written correctly. I've tested other sizes of floating-point-vars, but nothing helps.
That's the GCC (and EGCS) bug under IRIX that Miklos mentioned. It's a bug with real numbers as varargs which breaks Write[ln] of real numbers in GPC. There are plans to do Write[ln] without varargs in GPC, but since there are many other things to do, don't hold your breath...
So, the better thing to do is to report the problem to the EGCS maintainers and let them fix the bug. Here's a demo C program that shows this bug (writes 0 (or perhaps some random number) instead of 8 under IRIX) which you can send them to report the bug.
#include <varargs.h> #include <stdio.h>
void foo (va_alist) va_dcl { va_list p; double q; va_start (p); q=va_arg (p, double); printf ("%i\n", (int) q); }
int main () { double q = 8.0; foo (q); return 0; }
Frank
-- Frank Heckenbach, frank@fjf.gnu.de, http://fjf.gnu.de/ GPC To-Do list, latest features, fixed bugs: http://agnes.dida.physik.uni-essen.de/~gnu-pascal/todo.html