6.  Statements

      Statements must be separated by semicolon or newline. Except where altered by control statements, execution is sequential.

6.1.  Expression statements

      When a statement is an expression, unless the main operator is an assignment, the value of the expression is printed, followed by a newline character.

6.2.  Compound statements

      Statements may be grouped together and used when one statement is expected by surrounding them with { }.

6.3.  Quoted string statements

      "any string"
This statement prints the string inside the quotes.

6.4.  If statements
if(relation)statement

      The substatement is executed if the relation is true.

6.5.  While statements
while(relation)statement

      The statement is executed while the relation is true. The test occurs before each execution of the statement.

6.6.  For statements
for(expression; relation; expression)statement

      The for statement is the same as first-expression
while(relation) {
statement
last-expression
}

      All three expressions must be present.

6.7.  Break statements
break

      break causes termination of a for or while statement.

6.8.  Auto statements
auto identifier[,identifier]

      The auto statement causes the values of the identifiers to be pushed down. The identifiers can be ordinary identifiers or array identifiers. Array identifiers are specified by following the array name by empty square brackets. The auto statement must be the first statement in a function definition.

6.9.  Define statements
define([parameter[,parameter...]]){
statements
}

      The define statement defines a function. The parameters may be ordinary identifiers or array names. Array names must be followed by empty square brackets.

6.10.  Return statements
return
return(expression)

      The return statement causes termination of a function, popping of its auto variables, and specifies the result of the function. The first form is equivalent to return(0). The result of the function is the result of the expression in parentheses.

6.11.  Quit

      The quit statement stops execution of a BC program and returns control to UNIX when it is first encountered. Because it is not treated as an executable statement, it cannot be used in a function definition or in an if, for, or while statement.