In this code:
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
Forms, Dialogs, IdBaseComponent, IdComponent, IdTCPConnection,
IdTCPClient, IdIOHandler, IdGlobal, StdCtrls;
function WaitForCommand(args: Pointer): Cardinal; stdcall;
begin
while client.Connected do
if not HandleResponse(client.IOHandler) then
break;
Result := 0;
end;
I have this error:
[DCC Error] Unit1.pas(159): E2003 Undeclared identifier: 'HandleResponse'
How to understand messages?
Let's read it in parts:
DCC is the Delphi Compiler, so it is about our code, not about linking or packaging.
The file in which the error occurred. Normally Delphi's editor automatically display this file to you.
The line in which an error occurred. Normaly Delphi's editor automatically puts your text cursor into this line.
That's is the code of the error in case any further text is unavailable. It is like HTTP's status
404is a code (with the actual text "Not Found" for it) or like a traffic's lightredis a code (without any further text telling you to stop).At this point the compiler does not know how to interpret what is now named. And and even cannot tell you if it is a missing function, a missing type, or else - hence the overall term "identifer".
Normally Delphi's editor automatically puts your text cursor in the line of issue at the start of the text that cannot be understood.
What could you do?
It is undeclared. Declare it. However, only you can know what you want. You could
...or do other things I yet have to remember. But I'm sure you understand that in these 3 examples the identifier
HandleResponseis now declared. I don't have to tell you that declarations must be done before using it, right?