Compound Operator

A compound operator, also known as a block, consists of one or more operators of any type enclosed in curly braces {}. The closing brace } must not be followed by a semicolon ;.

**Syntax:**

{
  // One or more operators
}

**Example:**

if(x==0) {
  Print("invalid position x = ",x);
  return;
}

**See Also:**

  • [Initialization of Variables](/basis/variables/initialization)
  • [Visibility Scope and Lifetime of Variables](/basis/variables/variable_scope)
  • [Creating and Deleting Objects](/basis/variables/object_live)
  • **Navigation:**

  • [Operators](/basis/operators)
  • [Expression Operator](/basis/operators/expression)