Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.pascal.delphi.misc > #645

Re: Undeclared identifier error getting.

Newsgroups comp.lang.pascal.delphi.misc
Date 2014-10-07 04:41 -0700
References <49495c98-6639-46b0-9d55-48ea0e28404a@googlegroups.com> <-oSdnZ3UnPjMEKzJnZ2dnUVZ7r6dnZ2d@bt.com>
Message-ID <a43be300-76aa-4a17-9e48-c82c8dc13b89@googlegroups.com> (permalink)
Subject Re: Undeclared identifier error getting.
From Sandeepan Kashyap <sandeepan1982@gmail.com>

Show all headers | View raw


Thank you very much DoDi and Alan for your help. I worked :)

On Sunday, October 5, 2014 11:56:29 PM UTC+5:30, Alan Lloyd wrote:
> Sandeepan
> 
> 
> 
> Look up & understand a paragraph or section entitled "Scope" in the help 
> 
> file you have for whatever version of Delphi you have. It explains all this 
> 
> stuff that you're having problems with.
> 
> 
> 
> Alan Lloyd
> 
> 
> 
> 
> 
> "Sandeepan Kashyap" <sandeepan1982@gmail.com> wrote in message 
> 
> news:49495c98-6639-46b0-9d55-48ea0e28404a@googlegroups.com...
> 
> > Hi,
> 
> >
> 
> > we are trying to access a function DoSomething() of unit stringcheck from 
> 
> > unit Demographics . While running, we are getting 'Undeclared identifier: 
> 
> > 'TSharedFunctions1' error, not sure why? though we have used the unit in 
> 
> > main Unit.
> 
> > Any ideas will be greatly appreciated.
> 
> >
> 
> > unit stringcheck;
> 
> > interface
> 
> > implementation
> 
> >       {$R *.RES}
> 
> > uses sysutils ,StrUtils;
> 
> > type
> 
> >  TSharedFunctions1 = class
> 
> >    public
> 
> >      function DoSomething: string;
> 
> >    end;
> 
> > function TSharedFunctions1.DoSomething: string;
> 
> > begin
> 
> >  Result := 'Something done';
> 
> > end;
> 
> > end.
> 
> > *************************************************************************
> 
> > Main Unit (Demographics;)
> 
> > unit Demographics;
> 
> > interface
> 
> > uses
> 
> >  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, 
> 
> > Forms,
> 
> >  Dialogs, StdCtrls, Final, stringcheck; 
> 
> > //uses stringcheck.pas
> 
> > type
> 
> >  TForm2 = class(TForm)
> 
> >    Name: TLabel;
> 
> >    Edit1: TEdit;
> 
> >    Edit2: TEdit;
> 
> >    Label1: TLabel;
> 
> >    Memo1: TMemo;
> 
> >    Button1: TButton;
> 
> >    Button2: TButton;
> 
> >    Button3: TButton;
> 
> >    procedure Button1Click(Sender: TObject);
> 
> >    procedure Button2Click(Sender: TObject);
> 
> >    procedure Button3Click(Sender: TObject);
> 
> >    procedure FinalVal(Sender: TObject);
> 
> >  private
> 
> >    { Private declarations }
> 
> >  public
> 
> >        SharedData: TForm1;
> 
> >  end;
> 
> > var
> 
> >  Form2: TForm2;
> 
> > implementation
> 
> > {$R *.dfm}
> 
> > procedure TForm2.FinalVal(Sender: TObject);
> 
> > begin
> 
> >  ShowMessage('tetss'+ IntToStr(Form1.Test1));
> 
> > end;
> 
> > procedure TForm2.Button1Click(Sender: TObject);
> 
> > begin
> 
> >  ShowMessage('tetss print-'+ TSharedFunctions1.DoSomething()); 
> 
> > //Undeclared identifier: 'TSharedFunctions1'
> 
> > end;
> 
> >
> 
> >
> 
> > Thanks
> 
> > Sandeepan.
> 
> >

Back to comp.lang.pascal.delphi.misc | Previous | NextPrevious in thread | Find similar


Thread

Undeclared identifier error getting. Sandeepan Kashyap <sandeepan1982@gmail.com> - 2014-09-30 00:15 -0700
  Re: Undeclared identifier error getting. JJ <jj4public@vfemail.net> - 2014-09-30 16:31 +0700
  Re: Undeclared identifier error getting. Hans-Peter Diettrich <DrDiettrich1@aol.com> - 2014-09-30 11:23 +0200
    Re: Undeclared identifier error getting. Sandeepan Kashyap <sandeepan1982@gmail.com> - 2014-09-30 03:26 -0700
      Re: Undeclared identifier error getting. Sandeepan Kashyap <sandeepan1982@gmail.com> - 2014-09-30 04:23 -0700
        Re: Undeclared identifier error getting. Hans-Peter Diettrich <DrDiettrich1@aol.com> - 2014-09-30 16:31 +0200
  Re: Undeclared identifier error getting. "Alan Lloyd" <alanglloyd@NotThisBitbtinternet.com> - 2014-10-05 19:26 +0100
    Re: Undeclared identifier error getting. Sandeepan Kashyap <sandeepan1982@gmail.com> - 2014-10-07 04:41 -0700

csiph-web