gpc 20070904, based on gcc-3.4.5 (mingw special)
If an array of CHAR is used as the actual argument for a formal parameter declared as "x : PChar", a temporary STRING object is created, the actual argument is copied to the temporary, and the address of the temporary is passed to the subroutine.
This is no good when the parameter is a pointer to an output buffer.
Using "@s[1]" as the actual argument passes the right address, but if "s" is a STRING, the index "1" is checked, resulting in a RangeCheckError unless the STRING is initialized. I've accepted having to "SetLength" before reading or writing individual characters of the STRING. I didn't expect referring to a character of the STRING in order to get its address to be considered an "access" that would trigger a Range Check. (I planned to set the length of the STRING after the subroutine told me how many characters it had written to the buffer.)