Peter Gerwinski wrote:
In such situations, where the procedure/function does not change the parameter, you can declare it with a `PChar' parameter. GPC knows what to do if the user passes a String schema and implicitly passes the address of the string data instead of the address of the schema.
But it doesn't add a #0 terminator, so the result may be wrong, as in the following program:
program x; {$x+}
procedure p(x:pchar); begin writeln(x) end;
var x:string(10)='abc'; begin x:='x'; p(x) end.