# Operator

  • + addition
  • - subtraction
  • * multiplication
  • / floating point division
  • // division, but the result is rounded down
  • % modulo operation, division remainder
  • ^ power operation
  • ~= not equal to comparison
  • = assignment
  • .. string concatenation operator, which can be used to concatenate 2 strings
  • == equality comparison
  • more than

  • < less than
  • = greater than or equal to

  • <= less than or equal to
  • & bit and operation
  • | bit or operation
  • ~ bit negation
  • >> bit shift right
  • << bit shift left
  • and, for example, true and false, and multiple expressions connected by and and or operators, if it is not a single symbol expression, in order to avoid compilation errors caused by priority, please add a pair of complex expressions on both sides of and/or (), such as (2>1) and (1>2)
  • or or, for example, true or nil
  • not take Boolean inverse operation
  • # Take an array or string length operator, such as #array