Ver Mensaje Individual
  #2  
Antiguo 20-01-2010
Avatar de rgstuamigo
rgstuamigo rgstuamigo is offline
Miembro
 
Registrado: jul 2008
Ubicación: Santa Cruz de la Sierra-Bolivia
Posts: 1.646
Reputación: 17
rgstuamigo Va por buen camino
Arrow

Asi:
Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
var v1,v2:Integer;
begin
v1:=StrToInt(StringReplace(Edit1.Text,'.','',[rfReplaceAll]));{reeplazo los puntos(.) por Vacio ('') y 
convierto el string resultante en Integer  } 

v2:=StrToInt(StringReplace(Edit2.Text,'.','',[rfReplaceAll]));// Igual aqui
 if (v1 > v2) then
  ShowMessage('La mayor version es : '+Edit1.Text)
else if (v1 < v2)  then
     ShowMessage('La mayor version es : '+Edit2.Text)
     else ShowMessage('Son Iguales');
end;
Saludos...
__________________
"Pedid, y se os dará; buscad, y hallaréis; llamad, y se os abrirá." Mt.7:7

Última edición por rgstuamigo fecha: 20-01-2010 a las 18:19:53.
Responder Con Cita