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