Here we go:
Booleans:
They can be True or False(you might know them).
How do i declare them(remember begginer tuts)?:
How do i use them?
SCAR Code:
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:
SCAR Code:
If (Something) Or (This) Then
How 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:
SCAR Code:
If (Something) Xor (This) Then
True 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:
Not True = False;
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:
SCAR Code:
If (X < Y) Or (X = Y) Then
Just use:
And:
And check if both booleans are True.
SCAR Code:
If (True) And (True) Then
True And True = True;
True And False = False;
False And True = False;
False And False = False;