CStrings_(re)

Mon, 28 Apr 1997 05:29:34 -0400



You wrote:

>I encountered some problems with Procedures accepting `CString'
>parameters.  When passing a string constant to such a parameter, GPC
>does *not* automatically add a "chr ( 0 )" terminator.

I think it should. Much less confusing, probably more portable and in
Extended Pascal #0 is not recognized, so means a few characters more typing
pain.

Another solution, whith less performance impact would be to always add a
chr(0) to a string constant at compile time. I think I favor this approach.
The length returned should be the length minus chr(0) but the chr(0) should
be there.

Groetjes,

Berend.


Berend de Boer (berend@compuserve.com)

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