concept block in category algorithms

appears as: blocks, block
Algorithms and Data Structures in Action

This is an excerpt from Manning's book Algorithms and Data Structures in Action.

That leads to 4 simple rules to handle our locks, shown in table 7.4.

To simplify things, as mentioned, we won’t bother with declaring variables, and we will instead assume function-scope, so variables can be accessed everywhere inside a function (see below). We will also assume lexical scope (aka static scope), so the life of variables ends when a function execution is completed, and there will be no support for closures.

Finally, blocks will be defined by indentation only: you can see the examples above are already indented, but the following example should clarify even further:

for i in {0..n-1} do
  k ← i * 2
  j ← i * 2 + 1
  if i % 2 == 0 then
    A[k] ← 1
    A[j] ← 0
  else
    A[k] ← 0
    A[j] ← 1
A[2*n-1] ← 0