Writeln and longint_(re)

Thu, 9 Oct 1997 15:57:28 +0200 (MEST)


According to Kevin A. Foss:
> 	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:
> [...]
> It compiles fine, but for output I get simply:
> 
> [C:\kevin\pascal\gpc-test]longint
> qd

Ah!  The occurrence of this error means that you successfully installed
gpc-971001 including the new RTS.  :-)-:

> Any ideas as to what might be going wrong?  From looking through the
> new RTS code, 'qd' is the format that is used for longints,
> (RTS-WRTI.C) but I don't know what the 'q' is supposed to do as it
> isn't a standard printf() style format (AFAIK)

As far as I can look up from the Linux on-line C documentation, `qd'
is a standard format.  Some C compilers comply to this standard, while
others use `lld' or `Ld' for putting out `long long int'.  GCC should
support all of these variants, so I wonder what is going wrong on EMX.

The same problem holds, BTW, for the DEC Alpha. :-(

If anybody knows a portable way to output `long long in' in C, please
let us know, so we can improve GPC's RTS.  (I know, I am asking this
question to the wrong mailing list ...)

    Peter

 Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer
peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [971005]
 maintainer GNU Pascal [971001] - http://home.pages.de/~gnu-pascal/ [971005]


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