Autor Beitrag
Killmag10
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 297

Suse Linux / DOS / Windows All In One ;)
D4 / D2005
BeitragVerfasst: Mi 22.10.03 19:54 
hi

kann mir nehmand sagen warum das nich geht ?

ausblenden Delphi-Quelltext
1:
2:
3:
...
if dntodw(dadname1)=(4 or 6 or 7then
...


or heist ja oder

da müste ja deoretisch wenn die 4,6 oder 7 drin vor kommt es ja true sein !

macht er aber nett es is immer else

was mach ich falsch :?:

_________________
Mega-inkompetente Computer-ruinierende Organisation spioniert ohne funktionierende Technik
MSCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1448
Erhaltene Danke: 3

W7 64
XE2, SQL, DevExpress, DevArt, Oracle, SQLServer
BeitragVerfasst: Mi 22.10.03 19:58 
or ist logische Verknüpfung was du meinst ist
ausblenden Delphi-Quelltext
1:
if dntodw(dadname1) in [4,6,7]) then					


wenn ich mich nicht ganz irre
Zitat:
ist (or 1 or 2) ergibt

1=0000 0001
2=0000 0010
das ganze verodert ergibt
0000 0011 also 3

Du vergleichst also dein ergebnis mit 3 !!

grez
msch

_________________
ist das politisch, wenn ich linksdrehenden Joghurt haben möchte?
Killmag10 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 297

Suse Linux / DOS / Windows All In One ;)
D4 / D2005
BeitragVerfasst: Mi 22.10.03 20:01 
MSCH hat folgendes geschrieben:
or ist logische Verknüpfung was du meinst ist
ausblenden Delphi-Quelltext
1:
if dntodw(dadname1) in [4,6,7]) then					


grez
msch


Danke es geht ! :D

_________________
Mega-inkompetente Computer-ruinierende Organisation spioniert ohne funktionierende Technik
ErnestoChe
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 528

Win 2000 pro, CRUX 2.0
Delphi 6 Pers, Open K3
BeitragVerfasst: Do 23.10.03 09:14 
Hi,

wenn schon or, dann so:

ausblenden Delphi-Quelltext
1:
if (dntodw(dadname1) = 4or (dntodw(dadname1) = 6or (dntodw(dadname1) = 7then					


MFG

- Ernesto -
MrSaint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1033
Erhaltene Danke: 1

WinXP Pro SP2
Delphi 6 Prof.
BeitragVerfasst: Mo 03.11.03 15:34 
also die logische OR-verknüpfung von 4, 6 und 7 is:


4= 0000 0100
6= 0000 0110
7= 0000 0111
============
L= 0000 0111

=> (4 or 6 or 7) = 7

klingt zwar irgendwie komisch, is aber so ;)


MrSaint

_________________
"people knew how to write small, efficient programs [...], a skill that has subsequently been lost"
Andrew S. Tanenbaum - Modern Operating Systems