# Boolean Type
The `Boolean` type represents a logical value that can be either `True` or `False`.
## Literals
The two standard boolean constants are `True` and `False`. They are case-insensitive in the source code but conventionally written in PascalCase.
```pascal
// Type inference
var isReady := True;
var hasFinished := False;
// Explicit typing
var isValid : Boolean := True;
var isComplete : Boolean;
isComplete := False;
// OUTPUT NONE
```
## Operations
Booleans are used with logical operators: `not`, `and`, `or`, `xor`, and `implies`. All logical operators in DWScript are **short-circuiting** (evaluated left-to-right, stopping as soon as the result is determined).
```pascal
var a := True;
var b := False;
var result := (a or b) and (not b); // True
// Implies: True implies False is False
var imp := a implies b;
PrintLn('Implies: ' + imp.ToString);
// OUTPUT
// Implies: False
```
## Comparisons
Comparison operators (`=`, `<>`, `<`, `>`, `<=`, `>=`) result in a Boolean value.
```pascal
var x := 10;
var y := 20;
var isGreater := x > y; // False
// OUTPUT NONE
```
## String Conversion
Booleans can be converted to strings using `BoolToStr` or the `.ToString` helper.
```pascal
var b := True;
PrintLn(b.ToString); // "True"
PrintLn(BoolToStr(True)); // "True"
// OUTPUT
// True
// True
```
:::info
### Logic & Control
Booleans are the foundation of decision making.
See
**[Conditionals](/lang/control_flow/control_flow)**
for usage in `if` and `case` statements.
Or explore
**[Basic Operators](/lang/basics/operators)**
for logical operations like `and`, `or`, and `not`.
:::
Boolean Type
The Boolean type represents a logical value that can be either True or False.
Literals
The two standard boolean constants are True and False. They are case-insensitive in the source code but conventionally written in PascalCase.
Booleans are used with logical operators: not, and, or, xor, and implies. All logical operators in DWScript are short-circuiting (evaluated left-to-right, stopping as soon as the result is determined).
var a :=True;var b :=False;var result :=(a or b)and(not b);// True// Implies: True implies False is Falsevar imp := a implies b;
PrintLn('Implies: '+ imp.ToString);
Result
Implies: False
Comparisons
Comparison operators (=, <>, <, >, <=, >=) result in a Boolean value.
var x :=10;var y :=20;var isGreater := x > y;// False
String Conversion
Booleans can be converted to strings using BoolToStr or the .ToString helper.
var b :=True;
PrintLn(b.ToString);// "True"
PrintLn(BoolToStr(True));// "True"
Result
True
True
Logic & Control
Booleans are the foundation of decision making.
See Conditionals for usage in if and case statements.
Or explore Basic Operators for logical operations like and, or, and not.