[fpc-devel] Extended syntax and internproc?

Bart bartjunk64 at gmail.com
Sun Feb 11 17:47:44 CET 2018


Hi,

fpc 3.0.4 32-bit on win10.

{$mode objfpc}
{$h+}
{$EXTENDEDSYNTAX ON}
program Project1;
var
  i: integer;
  d: double;
begin
  {i:=}sqr(i);
  {i:=}sqr(d); //ilegal expression
  {d:=}sin(i); //ilegal expression
  {d:=}sqrt(i); //illegal expression
end.

Am I correct in assuming that internproc's do not allow dropping
function results?
Sqr(integer) is defined as internconst, sqr(valreal) as internproc.

If so, why?
Just curious.

Bart



More information about the fpc-devel mailing list