(block...)
Creates a code block that you can exit. You have to manually branch to the bottom of the code block using either the br or br_if instructions.

Syntax

(block $label (param...) (result...))
block $label (param...) (result...)
  ...
end

Parameters

$label Optional
The name of the block. This is used with the branch instructions br and br_if. Each code block, both loop and block, are given an index. The inner most code block will have index 0 and its parent will have index 1, and so on.

Example

;; Create block section
block $name_of_block_section
  ;; Do something

  ;; We want to stop and move past section
  br $name_of_block_section

  ;; Do something else (will not get here)
end