Whats wrong?!?_(re)

Thu, 12 Jun 1997 23:01:19 +0200 (MET DST)


According to Frank Heckenbach:
>  
> Why is this correct? Isn't Text, being declared as an array of char,
> treated as a 0-terminated string, meaning that the #0 should not be
> printed?

No.  Text being declared as an array of char is treated as a string of
fixed length.  The Standard doesn't say anything about 0-termination.
If GPC sometimes takes `chr ( 0 )' as the end of a string, this behaviour
is a remainder of the C back-end and should be reported as a BUG.
(I am not, however, speaking of `CString's (= `PChar's) which are a GNU
(resp. Borland) extension.)

    Peter

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


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