Ver Mensaje Individual
  #6  
Antiguo 15-09-2005
Avatar de papulo
papulo papulo is offline
Miembro
 
Registrado: ago 2005
Ubicación: Lleida - Cataluña - España -Europa - Planeta tierra - Sistema solar - Via Lactea ...
Posts: 542
Reputación: 21
papulo Va por buen camino
Talking

Cita:
Empezado por rastafarey
Código Delphi [-]
  procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
  begin
    If Key = #13 Then Begin
      If CompareText(Edit1.Text, 'VAR') = 0 Then
         ShowMessage('VAR')
      Else If CompareText(Edit1.Text, 'INT') = 0 Then
         ShowMessage('INT')
      Else
         ShowMessage('Escribe mejor, chavalote')
    End;
  end;
(...insertar aqui una percepcion erronea sobre mi nivel de DELPHI. Estoy muy PezQueñin todavia... ¡y lo que me queda!)
Solo matizar, que faltaba igualar los if a 0, para que tuvieran una condicion que cumplirse y asi poder ejecutar las instrucciones anidadas.

PD: Si utilizo mal algun termino, sientanse libres de corregirme que tomare buena nota.
Responder Con Cita