Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2018-02

Extended syntax and internproc?

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bart

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

Reply by email