io7m
io7m-jparasol
0.11.3
5.2. Constructors
5. Types
5.4. Float
Previous
Up
Next
5.3
Integer
5.3.1
Description
1
The
integer
type represents a signed,
32
bit, two's-complement integer. Values outside of the range
[-(2³¹), (2³¹) - 1]
are silently wrapped to produce the low-order
32
bits of the result.
5.3.2
Constructors
1
The type has the following
constructors
:
5.3.2.1. Constructors
integer → integer
boolean → integer
float → integer
2
The constructor taking a value
v
of type
boolean
results in an integer value
0
iff
v = false
and an integer value
1
iff
v = true
.
3
The constructor taking a value
v
of type
float
results in an integer value consisting of the integral part of
v
with the fractional part truncated.
4
The
integer
type is a
scalar
type. As with the other
scalar
types, the type rule for the construction of values of type
integer
is:
5.3.2.2. Scalar new type rule (new_scalar)
Previous
Up
Next
5.2. Constructors
5. Types
5.4. Float