upgrade
[rrq/rrqforth.git] / adoc / p_else.adoc
1 // control.asm: WORD p_else,'ELSE',fasm
2
3 anchor:p_else[]
4
5 === Word: ELSE
6
7 ....
8 Data stack: Compiling: ( a -- a )
9 ....
10
11 "ELSE" is an immediate function word that is used together with
12 <<p_if,IF>> and <<p_then,THEN>> to implement structured execution
13 control. ELSE lays out an unresolved unconditional branch as an ending
14 for the "then-part" of the structured statement, and it then performs
15 the branch resolution for the "else-part". To that end it replaces the
16 stacked address which pin-points the foot address the branch offset to
17 resolve, so that at execution time there is an appropriate conditional
18 branch past the "then-part" and the "else-part" of the "structured
19 statement".