Ver Mensaje Individual
  #2  
Antiguo 06-04-2011
Keiso Keiso is offline
Miembro
 
Registrado: ago 2004
Ubicación: Bolivia
Posts: 20
Reputación: 0
Keiso Va por buen camino
Para la primera parte podría servirte este procedimiento:
Código Delphi [-]
procedure CommaTextToStrs( AStrs: TStrings;const Value: string ;const AchDelim : Char );
var
 P, P1     : PChar;
 S         : string;
 chDelim   : char ;
begin
 chDelim := AchDelim ;
 AStrs.BeginUpdate;
 try
  AStrs.Clear;
  P := PChar(Value);
  while P^ in [#1..' '] do
   P := CharNext(P);
  while P^ <> #0 do
   begin
    if ( P^ = '"' ) then
     S := AnsiExtractQuotedStr(P, '"')
    else
     begin
      P1 := P;
      while (P^ > ' ') and ( P^ <> chDelim ) do
       P := CharNext(P);
      SetString(S, P1, P - P1);
     end;
    AStrs.Add(S);
    while P^ in [#1..' '] do
     P := CharNext(P);
    if P^ = chDelim then 
     repeat
      P := CharNext(P);
     until not (P^ in [#1..' ']);
    end;  // while
  finally
   AStrs.EndUpdate;
  end;
end;

Su uso sería el como sigue:
Código Delphi [-]
var
Strs1: TStringList; // Donde estarán guardados tus HEX individuales
inStr: String;        // Tus HEX agrupados 0:10:8:0:E0:6:0:0:2:10:8:0:4:0:0:0

CommaTextToStrs( Strs1, inStr, ':' );
para lo segundo, supongo que con byte te refieres en decimales, esto es lo primero que encontré:

http://www.greatis.com/delphicb/tips...s-hex2dec.html

o para cambiar entre cualquier base este es un buen componente:

http://wenwen.soso.com/z/q156828058.htm

Última edición por ecfisa fecha: 06-04-2011 a las 04:11:18. Razón: ETIQUETAS: [DELPHI] [/DELPHI]
Responder Con Cita