unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm2 = class(TForm)
Efile: TEdit;
Label1: TLabel;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
public
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.Button1Click(Sender: TObject);
Var cStrings :TStrings;
nLeng, i :Integer;
cLetra :Char;
begin
cStrings := TStrings.Create;
try
cStrings.LoadFromFile(Efile.text);
nLeng := Length(cStrings.Text);
for I := 0 to nLeng do
begin
cLetra := cStrings.Text[i]; end;
finally
cStrings.free;
end;
end;
end.