Forth Expert · Lesson 10

Custom control structures: AHEAD, CS-ROLL, CS-PICK

Work the control-flow stack directly: jump forward with ahead, rebuild WHILE with cs-roll, add a continue with cs-pick, and leave loops through two exits.

Lessons · Forth Expert · Lesson 10 of 10

Custom control structures: AHEAD, CS-ROLL, CS-PICK

Work the control-flow stack directly: jump forward with ahead, rebuild WHILE with cs-roll, add a continue with cs-pick, and leave loops through two exits.

Illustration for Forth
Work the control-flow stack directly: jump forward with ahead, rebuild WHILE with cs-roll, add a continue with cs-pick, and leave loops through two exits.