[lazarus] Converting string to pgchar?

michael at tfdec1.fys.kuleuven.ac.be michael at tfdec1.fys.kuleuven.ac.be
Fri Jun 18 17:02:44 EDT 1999




On Fri, 18 Jun 1999, John Margaglione wrote:

> Does anyone know how to convert a pascal String to a glib PGChar?  I assumed
> that since PGChar is actually just a pointer to a char, that I could use
> PChar( stringvar ).  That, however, doesn't compile.  I tried
> PGChar(PChar(stringvar)).   That didn't work either.  Any ideas?

If you use ansistrings 
  PChar(SringVar) 
will work.

If not, you must use the strpcopy () function. (see strings unit in
documentation)

Michael.






More information about the Lazarus mailing list