Ver Mensaje Individual
  #9  
Antiguo 10-09-2008
[coso] coso is offline
Miembro Premium
 
Registrado: may 2008
Ubicación: Girona
Posts: 1.678
Reputación: 0
coso Va por buen camino
hola,
lo mismo sin usar objetos...

Código Delphi [-]
var
        s : array of string;
        txt : string;
        i,j : integer;
begin
        txt := 'uno#dos#tres#cuatro';
        setlength(s,1);

        i := 1;
        j := 0;
        while i < length(txt) + 1 do
        begin
                if txt[i] = '#' then
                begin
                        setlength(s,length(s) + 1);
                        inc(j);
                end
                else
                s[j] := s[j] + txt[i];

                inc(i);
        end;

        for i := 0 to length(s) - 1 do showmessage(s[i]);
        setlength(s,0);
end;

Última edición por coso fecha: 10-09-2008 a las 15:31:50.
Responder Con Cita