Warning! This page documents an earlier version of Flux, which is no longer actively developed. Flux v0.65 is the most recent stable version of Flux.

Note: This document is a living document and may not represent the current implementation of Flux.

A block is a possibly empty sequence of statements within matching braces ({}).

Block         = "{" StatementList "} .
StatementList = { Statement } .

In addition to explicit blocks in the source code, there are implicit blocks:

  1. The options block is the top-level block for all Flux programs. All option assignments are contained in this block.
  2. The universe block encompasses all Flux source text aside from option statements. It is nested directly inside of the options block.
  3. Each package has a package block containing all Flux source text for that package.
  4. Each file has a file block containing all Flux source text in that file.
  5. Each function literal has its own function block even if not explicitly declared.

Blocks nest and influence scoping.