Core types
Bosque provides some basic types established in the definition of the language itself, commonly called primitive types. Let's see what they are.
Int
The Int type is used to represent positive and negative whole numbers whose values can be in the range from -9007199254740991 to 9007199254740991.
Let's see an example of a declaration and assignment of a Int
type identifier:
var n: Int; n = 53;
Here is a tiny subset of useful methods available on Int
type:
Bool
A Bool type can only store a Boolean value (true or false) as a bit representation – 1, 0.
Let's now see an example of the declaration and assignment of a Bool
type identifier:
var flag: Bool; flag = true;
According to the Bool
implementation, we have the following useful methods:
String
A String...