#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    5
    Rep Power
    0

    Undeclared identifier


    Hey guys Im getting the Undeclared identifier error on a simple program.

    ApdSLController1.Monitoring := True;
    ApdSLController2.Monitoring := True;

    Its saying the ApdSLControllers are undeclared, Im not sure what to do.

    Any tips?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2008
    Posts
    344
    Rep Power
    6
    Originally Posted by jde08
    Hey guys Im getting the Undeclared identifier error on a simple program.

    ApdSLController1.Monitoring := True;
    ApdSLController2.Monitoring := True;

    Its saying the ApdSLControllers are undeclared, Im not sure what to do.

    Any tips?
    Assuming ApdSLController1 and 2 are components on your form, then the place I would assume the error is coming from is that you added a methods to your form, but didn't make that method a part of your form's declaration. i.e.
    Code:
    Form1 = class(TForm)
    ...
    private
       procedure newprocedure; //make sure you declare the method in your form's type declaration
    public
       ...
    end;
    
    procedure TForm1.NewProcedure;//without "TForm1." will give Undeclared identifier error.
    begin
       ...
       ApdSLController1.Monitoring := True;
       ApdSLController2.Monitoring := True;
       ...
    end;

IMN logo majestic logo threadwatch logo seochat tools logo