November 2017
Beginner
316 pages
6h 40m
English
Julia provides operators that can be used for easy comparison and updating:
# updating a variable by adding a value to itjulia> x = 4; x += 1014# similarly, division operation can also be donejulia> x = 4; x/=22.0
In the preceding example, the type of x changes from Int to Float. This happens because the updating operator binds the value to the variable on the left side.
The following is a small subset of the updating operators:
Similarly, there are operators for numerical comparisons. These operators are frequently used.
The following is a small subset of the comparison operators:
Examples of comparison operations:
julia> 100 > 99.9truejulia> 24 == 24.0truejulia> 24 === 24.0 ...
Read now
Unlock full access