Delphi Error – E2035 Not enough actual parameters

Delphi Compiler Error

E2035 Not enough actual parameters

Reason for the Error & Solution

This error message occurs when a call to procedure or function gives less parameters than specified in the procedure or function declaration.

This can also occur for calls to standard procedures or functions.

program Produce;
var
  X: Real;
begin
  Val('3.141592', X);   (*<-- Error message here*)
end.

The standard procedure Val has one additional parameter to return an error code in. The example did not supply that parameter.

program Solve;
var
  X: Real;
  Code: Integer;
begin
  Val('3.141592', X, Code);
end.

Typically, you will check the call against the declaration of the procedure called or the help, and you will find you forgot about a parameter you need to supply.

Share:

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

Delphi Compiler Error X2421 Imported identifier ‘%s’ conflicts with ‘%s’ in ‘%s’ Reason for the Error & Solution This occurs...
Delphi Compiler Error X2367 Case of property accessor method %s.%s should be %s.%s Reason for the Error & Solution No...
Delphi Compiler Error X2269 Overriding virtual method ‘%s.%s’ has lower visibility (%s) than base class ‘%s’ (%s) Reason for the...