<= (less than or equal to) operator

Type Assocation Precedence Input types Output types
binary left 3 int
float
bool

This operator compares the first operand to the second operand and returns false if the first operand is larger, or true otherwise. Examples:

  3 <= 2        ; false  5 <= 5        ; true  2.12 <= 3     ; true  4.23 <= 3.86  ; false    

Notes

  • This operator can also be used with complex operands (in which case it only compares the real parts), but this is not recommended and results in a compiler warning. You should use real, imag, cabs, or the |…| operator when comparing complex expressions.
  • a <= b is equal to !(a > b)

See Also
< (less than) operator
>= (greater than or equal to) operator

<= (less than or equal to) operator