==============================
改错200分
==============================
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
type
TFileSplite=class
public
procedure Splite(FileName:string);
//procedure SavetoFile;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
Procedure TFileSplite.Splite(FileName:string);
//var FileName:String;
var GatherStrList,SpliteStrList,TempFile:TStringList;
var i,TittleSign:integer;
var Tempstr:string;
begin
GatherStrList:=TStringList.Create;
SpliteStrList:=TStringList.Create;
GatherStrList.LoadFromFile(FileName);//load GatheredFile
TittleSign:= 0;
for i := 0 to (GatherStrList.Count-1) do
begin
if GatherStrList<>'[ti' then
begin
TempStr:=GatherStrList;
TempFile.Add(GatherStrList[TittleSign]);
TempFile.Add(TempStr);
TempFile.SaveToFile(GatherStrList[TittleSign]);
end;
if GatherStrList='[ti' then
begin
TittleSign:=i;
end;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var SpliteFile:TFileSplite;
var FileName:string;
begin
FileName:=Form1.Edit1.Text;
SpliteFile:=TFileSplite.Create;
SpliteFile.Splite(FileName);
end;
end.
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
请用上面给的例子(歌词格式)试验 必须通过