注册 登录
编程论坛 Delphi论坛

新手求助,could not compile used unit 错误

t271265 发布于 2015-06-08 13:48, 5202 次点击
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1; myinifile:Tinifile; filename:string

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
filename: = 'd:\tor.ini'
myinifile:=Tinifile.create('d:\tor.ini');//打开D盘的 tor.ini 文件。
myinifile.readstring('[系统]','数字','缺省值');//读取字符型数据。
ShowMessage(myinifile.readstring);
myinifile.Free;//释放INI文件。
end;
end.



错在什么地方啊
1 回复
#2
bccnwshmm2015-12-15 23:09
var
  Form1: TForm1; myinifile:Tinifile; filename:string

红线部分没有找到,可换成其它。


[此贴子已经被作者于2015-12-15 23:10编辑过]

1