Name

() (parentheses)

Description

Grouping and containing expressions and parameters. Parentheses have multiple functions relating to functions and structures. They are used to contain a list of parameters passed to functions and control structures and they are used to group expressions to control the order of execution. Some functions have no parameters and in this case, the space between parentheses is blank.

Examples

  • int a;
    a = (4 + 3) * 2;       // Grouping expressions
    if (a > 10) {          // Containing expressions
      line(a, 0, a, 100);  // Containing a list of parameters
    }
    

Syntax

  • function()
  • function(p1, ..., pN)
  • structure(expression)

Parameters

  • functionany function
  • p1, ..., pNlist of parameters specific to the function
  • structureControl structure such as if, for, while
  • expressionsany valid expression or group of expression

Related