curses suggestions wanted_(re)

Thu, 7 Aug 1997 14:19:13 +0200



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.


Frank Heckenbach (heckenb@mi.uni-erlangen.de)

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