ThN
ThN

Reputation: 3278

DCC Error : E2003 Undeclared identifier: 'Result'

I was screwing around with debug setting on my compiler and now I am getting these errors that I can't seem to get rid of.

[DCC Error] HASPCODE.PAS(223): E2003 Undeclared identifier: 'Result'

It didn't complain before, but now no matter what I said the debugging settings to it keeps raising the above error just for the HASPCODE.PAS file only.

For instance, Here is one of the functions where the error is raised.

function THasp.IsHasp:Boolean;
begin
  Result := fIsHasp; <<=======
end;

Upvotes: 1

Views: 3930

Answers (1)

David Heffernan
David Heffernan

Reputation: 612954

The implicit function Result variable is only available when the extended syntax compiler option is enabled.

The Result variable. In the {$X+} mode, the predefined variable Result can be used within a function body to hold the function's return value.

Upvotes: 9

Related Questions