Never too old to learn.

Pascal单元库

Posted on By Andy Zhu

Pascal单元库

格式:

unit [unit name];
interface //接口部分 
	uses
        //...
	type
        //...
	var
        //...
	const
        //...
	function ...;
	procedure ...;
implementation //实现部分
	function ...;
	begin
        //...
	end;
	procedure ...;
	begin
        //...
	end;
    //...
begin
	//初始化
end.

调用方法:

在程序开头写上uses [unit 1],[unit 2],...[unit n];

然后就可以用这几个单元中在接口中写过的功能了