Bonjour Maurice,
I can't test gpc until I build "Hello world" (or "bug") so your results are great news for us.
Our problem may have something to do with the FAA library and the way we had to link it to our code.
More likely it's because we have a quite old version of gpc and the problem we encountered was fixed in a subsequent release.
We'll see if the problem disappears after we rebuild our application using the new version of gpc (once I get it going).
Merci.
-----Original Message----- From: gpc-owner@gnu.de [mailto:gpc-owner@gnu.de] On Behalf Of Maurice Lombardi Sent: September 3, 2010 01:29 PM To: gpc@gnu.de Subject: Re: Null characters (& string implementation) in gpc
Le 03/09/2010 17:23, Morton, John a écrit :
We have not found a pure (Pascal-only) way to use gpc writeln (etc.) statements to send strings that must include null characters (in our case as part of a 4 byte binary time). The problem is that the implementation of the mapped C/C++ function prematurely terminates a message at the null, preventing the message from being transmitted properly.
I do not understand. The following test program works as expected:
program bug; var s: string[255] = 'hello >'+chr(0)+'< world'; begin writeln(s); end.
there is an unprintable character between the two > < and redirecting the output to a file which can be examined with a binary editor shows that this character is indeed a null.
Maurice