Autor Beitrag
charlieblue
Hält's aus hier
Beiträge: 1



BeitragVerfasst: Do 12.06.08 19:13 
Hallo,

ich programmiere eigentlich Java und möchte gerade ein Programm von Delphi nach java übersetzten. Dabei bin ich auf folgende Zeile gestossen:

ausblenden Delphi-Quelltext
1:
if ((delyr<0) and (delyr<>leap*4)) then TIME := TIME - 1;					


ich wüsste nun gerne, was das <> zu bedeuten hat.
Die Variable delyr ist vom Typ int.

Kann mir da jmd. helfen?

Viele Grüße

Tom
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Do 12.06.08 19:15 
So wie es da steht: Kleiner oder größer, sprich ungleich
in C (Java auch?) wäre das !=
Ebil
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 131



BeitragVerfasst: Do 12.06.08 23:11 
< kleiner
> größer
<= kleiner-gleich
>= größer-gleich
== gleich
!= ungleich

Alles gleich bis auf die beiden letzten die sind wie in PHP auch.
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Fr 13.06.08 09:17 
user profile iconEbil hat folgendes geschrieben:
< kleiner
> größer
<= kleiner-gleich
>= größer-gleich
== gleich
!= ungleich

Alles gleich bis auf die beiden letzten die sind wie in PHP auch.

Das wiss er als Java-Programmierer, er hat aber nach der Bedeutung von <> in Delphi gefragt

_________________
Markus Kinzler.
wazup
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 101

Windows XP
Delphi 2009
BeitragVerfasst: Fr 13.06.08 09:27 
ausblenden Delphi-Quelltext
1:
2:
3:
if MyString <> 'hallo' then ShowMessage('...'); // Wenn MyString nicht 'hallo' ist dann Nachricht zeigen
if MyInteger <> 0 then // Wenn MyInteger nicht 0 ist dann...
if MyBoolean <> false then // Wenn MyBoolean nicht false ist dann...


Siehe auch: Delphi-Kurs: Operatoren