unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;function make(id:integer):string;type
TForm1 = class(TForm)
Button1: TButton;
Label1: TLabel;
Edit1: TEdit;
ListBox1: TListBox;
ComboBox1: TComboBox;
procedure Button1Click(Sender: TObject);
procedure getorderID(sender:Tobject);
function getname(id:integer):string;
private
{ Private declarations }
public
{ Public declarations }
function getother(id:integer):string;
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
showmessage('测试窗口');
end;end.如上,这个是我的一个单元文件爱你,有如下问题请教。
1. getother函数和getname函数,由于处于的位置不同,有何区别?
其他单元都可以访问这两个函数么?2.make函数是不是只要其他的单元引用了unit,就可以直接调用make函数?3.make函数如果其他单元引用后都能调用,那么和getother函数的使用范围有什么区别?
make不属于TFrom1类,而其它相同
public
procedure getorderID(sender:Tobject);
function getname(id:integer):string;
end;