Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 1.44 KB

File metadata and controls

34 lines (26 loc) · 1.44 KB

Operators

Arcane supports a specific set of operators used in its scripting language. This section details the operators available.

Assignment Operators

  • =: Assigns the result of an expression to a variable.
  • +=: Augmented assignment; adds the right-hand value to the variable and assigns the sum.

Arithmetic Operators

  • +: Adds two numbers or concatenates strings.
  • -: Subtracts the right-hand operand from the left-hand operand.
  • *: Multiplies two integers.
  • /: Divides one integer by another (integer division).

Relational Operators

  • <: Returns true if the left-hand operand is less than the right-hand operand.
  • >: Returns true if the left-hand operand is greater than the right-hand operand.
  • <=: Returns true if the left-hand operand is less than or equal to the right-hand operand.
  • >=: Returns true if the left-hand operand is greater than or equal to the right-hand operand.

Equality Operators

  • ==: Checks if two values are equal.
  • !=: Checks if two values are not equal.

Logical Operators

  • &&: Logical AND; true if both operands are logically true.
  • ||: Logical OR; true if at least one operand is logically true.
  • !: Logical NOT; inverts the truth value of its operand.

Increment/Decrement Operators

  • ++: Increments an integer variable (supports both prefix and postfix usage).
  • --: Decrements an integer variable (supports both prefix and postfix usage).

Back to Index