Question

If i use AnsiStartsStr in delphi vcl have the error: undeclared identifier

I allready installed the fix pack but it didn't help. How can i fix this? I tried:

if AnsiStartsStr('CONNECTINFO<-+^+->', socket.receivetext) then
    begin;

    end;
Was it helpful?

Solution

In such a situation the first task is to look in the documentation. There are actually two functions with that name. They are documented here:

The title of the documentation tells you the unit you need. Either

  • System.AnsiStrings or
  • System.StrUtils

So you need to add the appropriate unit to your uses clause. I cannot tell for sure which function you need.

If you have problems searching the documentation try the advice here: How can I search for Delphi documentation? Of course you should just be able to click in the unrecognised identifier and press F1.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top