Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.pascal.delphi.misc > #636
| Newsgroups | comp.lang.pascal.delphi.misc |
|---|---|
| Date | 2014-09-30 00:15 -0700 |
| Message-ID | <49495c98-6639-46b0-9d55-48ea0e28404a@googlegroups.com> (permalink) |
| Subject | Undeclared identifier error getting. |
| From | Sandeepan Kashyap <sandeepan1982@gmail.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 | Next — Next in thread | Find similar
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