Show: Object Pascal C++
Display Preferences

E2070 Unknown directive - '%s' (Object Pascal)

From Appmethod Topics
Jump to: navigation, search

Go Up to Error and Warning Messages (Object Pascal) Index

This error message appears when the compiler encounters an unknown directive in a procedure or function declaration.

The directive is probably misspelled, or a semicolon is missing.


program Produce;

procedure P; stcall;
begin
end;

procedure Q forward;

function GetLastError: Integer external 'kernel32.dll';

begin
end.

In the declaration of P, the calling convention "stdcall" is misspelled. In the declaration of Q and GetLastError, we're missing a semicolon.


program Solve;

procedure P; stdcall;
begin
end;

procedure Q; forward;

function GetLastError: Integer; external 'kernel32.dll';

begin
end.

The solution is to make sure the directives are spelled correctly, and that the necessary semicolons are there.

Personal tools
In other languages