Ver Mensaje Individual
  #5  
Antiguo 23-11-2006
JULIOCTORRESG JULIOCTORRESG is offline
Miembro
 
Registrado: sep 2006
Posts: 58
Reputación: 20
JULIOCTORRESG Va por buen camino
A ver si te puedo ayudar.....

la idea seria recorrer los controles aprovechando que son del mismo tipo
preguntando por el valor mayor y almacenandolo en una variable....

algo asi //perdon si algun error se me escapa

var
mayor,i:integer;
begin
mayor:=0;
for i:=0 to ComponentCount -1 do
if components[i] is tedit then
begin
if tedit(components[i]).text > mayor then mayor:=STRTOINT(tedit(components[i]).text)

end;

end;
end;
// al final la variable Mayor debe contener el Numero mayor de todos
showmessage('El Mayor es : 'inttostr(mayor));


de repente se me escapa un end o algo asi pero la idea general es esa recorrer los componentes de tipo edit y comparar los numero ....espero que te sirva....

Última edición por JULIOCTORRESG fecha: 24-11-2006 a las 13:44:30.
Responder Con Cita