Cazax
2008-05-14 19:11:04
Here we go:
Booleans:
They can be True or False(you might know them).
How do i declare them(remember begginer tuts)?:
Or:
True Or True = True;
True Or False = True;
False Or True = True;
False Or False = False;
Or check if one or all of them are True.
Xor:
Some people doesn't know how does it work:
True Xor False = True;
False Xor True = True;
False Xor False = False;
Xor check if one of the sides is True.
Not:
Not False = True;
Not check if the following boolean isn't True.
>,<,=:
They compare two statements:
> : Returns True if the first statement is higher than the second.
<: Returns True if the first statement is lower than the second
=: Returns True if both statements are equal.
Examples:
There is a shortener way to do this:
And:
And check if both booleans are True.
True And False = False;
False And True = False;
False And False = False;
Booleans:
They can be True or False(you might know them).
How do i declare them(remember begginer tuts)?:
Var
BoolTest : Boolean;How do i use them?
Program New;
Var
BoolTest : Boolean;
Begin
BoolTest := True;
Writeln('BoolTest is '+BoolToStr(BoolTest)+'!');
BoolTest := False;
Writeln('BoolTest is '+BoolToStr(BoolTest)+'!');
End.You might remember them from begginer tuts, but here i'll explain them deeper…:Or:
If (Something) Or (This) ThenHow would i know if it returns True?:True Or True = True;
True Or False = True;
False Or True = True;
False Or False = False;
Or check if one or all of them are True.
Xor:
Some people doesn't know how does it work:
If (Something) Xor (This) ThenTrue Xor True = False;True Xor False = True;
False Xor True = True;
False Xor False = False;
Xor check if one of the sides is True.
Not:
If (Not (LoggedIn)) ThenNot True = False;Not False = True;
Not check if the following boolean isn't True.
>,<,=:
They compare two statements:
If (1 > 0) ThenIf (1 = 1) ThenIf (1 < 2) Then> : Returns True if the first statement is higher than the second.
<: Returns True if the first statement is lower than the second
=: Returns True if both statements are equal.
Examples:
If ('hi' = 'hi') ThenIf (1.1 > 1.5) ThenThere is a shortener way to do this:
If (X < Y) Or (X = Y) ThenJust use:If (X <= Y) ThenAnd:
And check if both booleans are True.
If (True) And (True) ThenTrue And True = True;True And False = False;
False And True = False;
False And False = False;