[fpc-pascal] Re: Converting code from C++ to FP....

Micha Nelissen micha at neli.hopto.org
Sun Mar 20 18:28:35 CET 2011

Jorge Aldo G. de F. Junior wrote:
> const has the same effect as fpc const before a parameter,

This is not true.

> double* SX0
> is the same as
> double *SX0
> or
> double * SX0
> so this becomes
> const SX0 : pdouble (ugly pointer as array Cishism)

No! 'const double * X' in C makes the pointed-to data const, while 
'const X: PDouble' in pascal makes the parameter itself const. You 
cannot assign another address of a double to it, while you can in C.

In C terms, pascal can only do 'double * const X'. Pascal is not really 
useful this way, 'const' is generally only useful for structures and 


More information about the fpc-pascal mailing list