[fpc-pascal] A better way?

Dennis dec12 at avidsoft.com.hk
Fri Apr 15 11:22:21 CEST 2016


> > You could describe it as typecast done in the var clause of a 
> method. The right hand identifier is not restricted to function 
> parameters.
>
> While it works using "absolute" for a public API is rather unsafe (I'd 
> only use that in private methods). In those cases the "as" operator 
> should he used (or at least "is" plus returning an error).
>
> Regards,
> Sven
>
>
May I know why it is unsafe to use absolute on public method's parameters?
Also, will there be any compiler options in which the parameters are 
passed through registers?  In that case, will the absolute of private 
method's parameters still work?

Dennis



More information about the fpc-pascal mailing list