Julia supports following comparison
operators. Comparison operators determine if one operand is greater than, less
than, equal to, or not equal to another operand. Comparison operator takes two
operands and return true, if the condition evaluates to true, otherwise return
false.
Operator
|
Description
|
==
|
equal to
|
!=
|
not equal to
|
>
|
greater than
|
>=
|
greater than or equal to
|
<
|
less than
|
<=
|
less than or equal to
|
julia> a=10;b=20; julia> a>b false julia> a<b true julia> a>=b false julia> a<=b true julia> !(a>b) true
No comments:
Post a Comment