Algorithm steps. Should not contain any HTML. The node's textContent is parsed as an Ecmarkdown document. Additionally, calls to abstract operations inside algorithm steps are automatically linked to their definitions by first checking for any clauses or algorithms with the appropriate aoid in the current spec, and afterwards checking any linked bibliography files.
Algorithm steps can be annotated with additional metadata as summarized in
replaces-step: If present, references a step to replace by its
<emu-alg>
- 1. Let _clauseAbstractOp_ be the result of calling EmuAlg().
- 1. If *false* is *true*, then
- 1. [id="step-example-label"] Let _recurse_ be the result of calling EmuAlg(*true*).
- 1. Return the result of evaluating this |NonTerminalProduction|.
+ 1. Let _length_ be 0.
+ 1. Let _node_ be this |ListNode|.
+ 1. Repeat, while _node_ is not *undefined*,
+ 1. Set _node_ to NextNode of _node_.
+ 1. [id="step-example-label"] Set _length_ to _length_ + 1.
+ 1. Return _length_.
</emu-alg>
<p>The following is an alernative definition of step <emu-xref href="#step-example-label"></emu-xref>.</p>
<emu-alg replaces-step="step-example-label">
- 1. Replacement.
- 1. Substep.
+ 1. Set _length_ to _length_ + 1.
+ 1. Let _weight_ be GetWeight of _node_.
+ 1. If _length_ = 10<sup>9</sup> or _weight_ > 2<sup>_length_ + 1</sup>, then
+ 1. Throw a *RangeError* exception.
</emu-alg>