[internproc:fpc_in_pi_real] means that valreal will be resolved by the compiler into pi with as resolution the correct max real type (single, double, extended, etc) for the platform: eg. i386 = extended, x86_64 = double.
It is related to the
compilerproc modifiier that is added in the implementation section if it is not a compiler const (here it is a compiler const) See e.g. declaration for Abs and implementation for Abs.
You can only use this construct in the
interface section of a unit and
only if there is a corresponding compiler intrinsic or const for that.
Basically
never use it yourself unless you are a compiler dev.. It is as magical as magic comes....
//mathh.inc interface
function abs(d : ValReal) : ValReal;[internproc:fpc_in_abs_real];
// compproc.inc implementation
function fpc_abs_real(d : ValReal) : ValReal;compilerproc;
In the case of pi, the const is first resolved through a index for known constants and then a FPU instruction if available and subsequently through the compiler function getpi in ninl.pas translated at compile time into a const of the correct size.
function getpi : bestreal;
begin
{$ifdef x86}
{ x86 has pi in hardware }
result:=pi;
{$else x86}
{$ifdef cpuextended}
result:=MathPiExtended.Value;
{$else cpuextended}
result:=MathPi.Value;
{$endif cpuextended}
{$endif x86}
end;
ValReal itself is determined through a set of defines based on the resolution of the cpu or fpu for the platform.
So basically: nice syntax, but not for you (or me)...