Ver Mensaje Individual
  #12  
Antiguo 12-02-2008
Avatar de felipe88
[felipe88] felipe88 is offline
Miembro Premium
 
Registrado: may 2007
Ubicación: Mi Valle del Cauca... Colombia!!!
Posts: 1.120
Reputación: 19
felipe88 Va por buen camino
Cita:
Empezado por PepeLolo Ver Mensaje
Otro ejemplo totalmente funcional.


Código Delphi [-]
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
    { Private declarations }
  public
    { Public declarations }
  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];   // Leer letra a letra o mejor dicho carácter a carácter
        // lo que quieras hacer con dicha letra
     end;
  finally
     cStrings.free;
  end;
end;
end.





un saludo
A algo asi me referia... el ejemplo de PepeLolo es totalmente funcional...
__________________
Web
Responder Con Cita