Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi operatortype nicht anwendbar!? (https://www.delphipraxis.net/43310-operatortype-nicht-anwendbar.html)

Harry M. 1. Apr 2005 11:43


operatortype nicht anwendbar!?
 
habe grad mal wieder nen kleines problem und ich weiß auch nicht so recht wie ich die suchmaschiene quälen soll um zum richtigen ergebnis zukommen...

was ist hierran bitte falsch:

Delphi-Quellcode:
    if CommandEdit.Text = 'cls' or 'CLS' then begin
      CommandMemo.Clear;
      CommandEdit.Clear;
      exit;
      end;

Steve 1. Apr 2005 11:45

Re: operatortype nicht anwendbar!?
 
Hi,

versuchs mal so:
Delphi-Quellcode:
if (CommandEdit.Text = 'cls') or (CommandEdit.Text = 'CLS') then...
:)

PS: Schau Dir bei der gelegenheit mal Delphi-Referenz durchsuchenUpperCase und Delphi-Referenz durchsuchenLowerCase an

Gruß
Stephan :dance:

3_of_8 1. Apr 2005 11:47

Re: operatortype nicht anwendbar!?
 
Das ist in Delphi das Problem der Operatorvorrangigkeit. Ich hab selbst erst ein paar Tage gebraucht, bis ich das rausgefunden habe.

Delphi-Quellcode:
if lowercase(commandedit1.text)='cls' then //mach irgendwas...

Harry M. 1. Apr 2005 11:47

Re: operatortype nicht anwendbar!?
 
danke funtz an upper and lowercase dachte ich auch schon. ich wollte es aber so habe danke nochmal.


Alle Zeitangaben in WEZ +1. Es ist jetzt 03:39 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz