Chapter 3. Basic types

Table of Contents

? (Boolean)
# (Number)
& (Real)
$ (String)

In this chapter, we will describe basic Rax types in more detail.

? (Boolean)

Unlike C, but like Pascal and Java, Rax has an explicit boolean type denoted by the ? symbol. A boolean variable can have only two values true and false, which are reserved keywords in Rax. The comparison operators, such as ==, >= return a boolean value. Also, the value used in the first part of the immediate-if operator, ?:, must be of boolean type. The following operators are defined on the boolean type:

Table 3.1. Operators defined on ?

Operator nameSyntax
Logical not!b
Logical anda && b
Logical ora || b
Logical xora ^^ b
Assignmenta := b
Equal toa == b
Not equal toa != b