Constants and its types
There are six types of constants in haXe. We will now take a look at all of them. Some of them are composed of several kinds of them.
Booleans
The first type of constants is one that is spread most across programming languages: Booleans. For your information, in haXe Booleans have the type
Bool
. The following are two expressions, which are Boolean constants:
true
false
That's both easy and important. By the way, in haXe Bool is indeed an Enum (if you don't know what this is, don't worry, we will learn about it later). This Enum has two values, and true and false are just reference to these values.
Booleans are generally used to represent the truthiness of things. For example, when one is presented with a checkbox in an interface, ...
Get haXe 2 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.