I F A=100 OR B=100 GOTO 20
Das Programm v e r z w e i g t nach Z e i l e 20, wenn entweder
A=100 i s t oder B=100 i s t .
I F X<Y OR B>=44 THEN F=0
Der
wenn entweder X k l e i n e r a l s Y oder B g r o e s s e r oder
g l e i c h 44 i s t .
I F A=1 AND B=2 OR C=3 GOTO 30
Das Programm v e r z w e i g t nach Z e i l e 30 wenn entweder
sowohl A=1 a l s auch B=2 i s t , oder wenn C=3 i s t .
Auch
e i n e i n z e l n e r
"unwahr" g e p r u e f t werden, indem n a e m l i c h
dene Wert a l s wahr und e i n Null-Wert a l s unwahr i n t e r p r e t i e r t w i r d .
Z.B.:
I F A THEN B=2
I F A O 0 THEN B=2
I F NOT B GOTO 100
I F B=0 GOTO 100
Die B o o l e s c h e n
zusammenfassen:
T a b e l l e 2.3: Boolesche W a h r h e i t s t a b e l l e
wahr
unwahr AND wahr
wahr
unwahr AND unwahr
wahr
unwahr OR
wahr
unwahr 0R
2.4.8.5 B i t - o r i e n t i e r t e Boolesche O p e r a t i o n e n
D i e s e r A b s c h n i t t i s t f u e r Anwender g e d a c h t , d i e t i e f e r i n d i e Com-
puter-Mathematik
M o e g l i c h k e i t , e i n z e l n e B i t s
schen oder bestimmte B i t m u s t e r i n einem Byte zu p r u e f e n . Wenn S i e
das n i c h t
i n t e r e s s i e r t , koennen S i e b e r u h i g t b e i A b s c h n i t t 2.4.9
w e i t e r l e s e n . Ihnen entgehen k e i n e w i c h t i g e n I n f o r m a t i o n e n .
V a r i a b l e n
F w i r d dann d e r Wert 0 z u g e w i e s e n ,
Term
kann
Operationen
l a s s e n
AND wahr
AND unwahr = unwahr
OR
wahr
wahr
OR
unwahr
unwahr
NOT wahr
NOT unwahr = wahr
e i n d r i n g e n w o l l e n . E r b e s c h a e f t i g t s i c h
i n einem Byte zu s e t z e n oder
m i t VC20-BASIC
j e d e r von N u l l
Beide B e f e h l s z e i l e n
s i n d g l e i c h w e r t i g .
Auch h i e r s i n d b e i d e
B e f e h l s z e i l e n g l e i c h w e r t i g ,
d i e z w e i t e i s t aber
s i c h t l i c h e r .
s i c h
i n e i n e r
-
wahr
= unwahr
=
unwahr
wahr
=
wahr
=
-
wahr
unwahr
unwahr
=
2 1
a u f "wahr"
oder
v e r s c h i e -
ueber-
W a h r h e i t s t a b e l l e
m i t d e r
z u l o e -