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.