allocate without locking (locked mem is limited)
[rrq/rrqforth.git] / adoc / p_if.adoc
1 // control.asm: WORD p_if,'IF',fasm
2
3 anchor:p_if[]
4
5 === Word: IF
6
7 ....
8 Data stack: Compiling: ( -- a )
9 ....
10
11 "IF" is an immediate function word that is used together with
12 <<p_else,ELSE>> and <<p_then,THEN>> to implement structured execution
13 control. IF results in layout of a <<p_0branch,0BRANCH>> instruction
14 with an unresolved branch offset, and places the address for resolving
15 this instruction on the datastack. This address will then be resolved
16 and asssigned by a subsequent <<p_else,ELSE>> or <<p_then,THEN>> so
17 that at execution time there is an appropriate conditional branch past
18 the "then-part" of the "structured statement".
19