__cstring__ question & comment

Tue, 8 Jul 1997 19:49:35 +0200 (MET DST)


According to Ken Linder:
> 
> the compiler will generate code to convert the string schema type to a real
> CString with '/0' termination and everything...  Am I right or was I seeing
> things? (it is rather late here in Las Vegas, NV, USA)  BTW, I am using ver
> 2.0 GPC on Linux and when I tried it, got an 'incompatible type' error.  No
> suprise there :^}

`CString' handling has been significantly improved since the days of
gpc-2.0.  Please take part in beta-testing gpc-970624, available at
ftp://agnes.dida.physik.uni-essen.de/gnu-pascal/beta/.

> Why do we have __cstring__ anyway?  It seems as though we could get away
> with just declaring a type like:  CString = ^Char   Unless it does something
> else I don't see yet |-)

It's needed for compatibility with C, Borland Pascal, and Delphi.
(For the latter cases it can also be called `PChar' now.)  And, BTW,
in gpc-970624 you can drop the underscores.

Greetings,

    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 [970624] - 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