Ver Mensaje Individual
  #4  
Antiguo 19-09-2005
Avatar de FunBit
FunBit FunBit is offline
Miembro
 
Registrado: jun 2005
Ubicación: Santa Maria d'Oló
Posts: 572
Reputación: 19
FunBit Va por buen camino
Por otra parte ...

Código Delphi [-]
The case statement
 
 case I of
 
   1..5: Caption := 'Low';
   6..9: Caption := 'High';
   0, 10..99: Caption := 'Out of range';
 else
   Caption := '';
 end;
es equivalente a las condiciones anidadas...

Código Delphi [-]
 if I in [1..5] then
 
   Caption := 'Low'
   else if I in [6..10] then
     Caption := 'High'
     else if (I = 0) or (I in [10..99]) then
       Caption := 'Out of range'
       else
         Caption := '';

Saludos!!
__________________
Brot Psicòtik
Responder Con Cita