Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi if not - Abfrage (https://www.delphipraxis.net/39354-if-not-abfrage.html)

Plague 1. Feb 2005 13:42


if not - Abfrage
 
Hallo,

wie kann ich Prüfen ob Etwas nicht = Etwas ist?
Also:
Delphi-Quellcode:
if Label2.Caption not = '' then
Gruß
Thomas

Steve 1. Feb 2005 13:43

Re: if not - Abfrage
 
Hi,

Delphi-Quellcode:
//entweder
IF NOT (x=y) THEN

//oder
IF (x<>y) THEN
Gruß
Stephan :dance:

Rastaman 1. Feb 2005 13:43

Re: if not - Abfrage
 
Code:
If (not Label1.Caption = '') then

Dax 1. Feb 2005 13:44

Re: if not - Abfrage
 
Du willst Ungleichheit überprüfen? Nimm doch den "negierten Vergleichsoperator", besser bekannt als <> ;)

Chuqa 1. Feb 2005 13:44

Re: if not - Abfrage
 
Hi,

also wenn mich nicht alles täuscht geht es mit
Code:
if not (label2.caption=' ') then ...

moritz 1. Feb 2005 13:50

Re: if not - Abfrage
 
Zitat:

Zitat von Chuqa
Hi,

also wenn mich nicht alles täuscht geht es mit
Code:
if not (label2.caption=' ') then ...

Das kann ich bestätigen :mrgreen:

Neutral General 1. Feb 2005 13:51

Re: if not - Abfrage
 
Oder (Beispiel für <>)

Delphi-Quellcode:
if Label1.Caption <> '' then
...


Alle Zeitangaben in WEZ +1. Es ist jetzt 09:29 Uhr.

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