Stuart Pope wrote:
Dear Mr. Heckenbach,
I apologize for belaboring my issue, but hopefully, your answers are of benefit to others as well as myself. I took your suggestion and used the --automake flag when compiling my test program and your solution worked great! There is one additional twist, though. Real numbers are only output correctly if there is no precision needed beyond the decimal point. For example, this test code,
program testprog(input,output);
uses GPC;
var x : real; fieldwidth : integer; fieldprec : integer;
begin x := 1000.909;
fieldwidth := 0; fieldprec := 0;
writeln('The value of x is ', longReal2Str (x,fieldwidth,fieldprec));
fieldwidth := 0; fieldprec := 3;
writeln('The value of x is ', longReal2Str (x,fieldwidth,fieldprec)); end.
produces the following output:
The value of x is 1001 The value of x is 10091009
Is there a solution for the case where decimal precision is needed? Thanks again for your help.
That seems to be another bug. Could you please try it with some other values, like:
x := 123456789.987654321; x := -123456789.987654321E40;
Did you try the C test programs about varargs?
Frank