Writeln and longint_(re)

Mon, 13 Oct 1997 02:35:58 +0200



I wrote:

> Kevin A. Foss wrote:
>
> > Hello,
> > 	In my process of getting gpc to compile under OS/2, I've been
> > trying some example code and Peter recommended trying stuff like
> > writing longints to see if the new features in 971001 were working. 
> > Well, I tried the following:
> > -=-=-=-=-
> > program testlongint(output);
> > 
> > Var
> >         i : longint;
> > 
> > begin
> >         i := 1;
> >         writeln(i);
> > end.
> > =-=-=-=-=
> > It compiles fine, but for output I get simply:
> >
> > [C:\kevin\pascal\gpc-test]longint
> > qd
>
> I'll see what I can do about it. In the worst case, I'll have to
> rewrite the output of integers completely which I planned to do
> (later) anyway...

OK, that's what I did now. I re-wrote the outputting of integers and reals
in Pascal now. So this program should work with the next GPC version.

However, especially the writing of reals has many special cases, so there may
be some bugs left. So please, everyone who's interested in this, write some
test programs, and submit them (!) -- preferably with (what you think are)
"special cases". It's better if the author doesn't do this himself because
he'll usually have handled those special cases that he thinks about...

--
Frank Heckenbach, Erlangen, Germany
heckenb@mi.uni-erlangen.de
http://home.pages.de/~fjf/links.htm


Frank Heckenbach (heckenb@mi.uni-erlangen.de)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es