Ver Mensaje Individual
  #4  
Antiguo 28-07-2006
Avatar de Héctor Randolph
[Héctor Randolph] Héctor Randolph is offline
Miembro Premium
 
Registrado: dic 2004
Posts: 882
Reputación: 20
Héctor Randolph Va por buen camino
La sentencia case también acepta rangos.

Prueba de esta forma:

Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
var
  I:Integer;
begin
  I:=1000;
  case I of
   0: ShowMessage('Cero');
   1..High(Integer): ShowMessage('Mayor a cero');
   else ShowMessage('Menor a cero');
  end;
end;

Saludos
Responder Con Cita