[fpc-pascal] const pchar parameters?

Jonas Maebe jonas.maebe at elis.ugent.be
Sat Dec 31 19:17:20 CET 2005


On 31 Dec 2005, at 19:09, L505 wrote:

> When using pchars, what happens when one does this:
>
> function test(const input: pchar): integer;
>
> Is this a pointer to a pchar? Or is it just a pchar?

It can be either of those. The compiler is free to choose what it  
does. All you know for sure is that when you try to assign something  
to "input", the compiler will throw an error.

x
Jonas




More information about the fpc-pascal mailing list