Mirror of CollapseOS
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

4 роки тому
12345678910111213141516
  1. Flow
  2. Note about flow words: flow words can only be used in
  3. definitions. In the INTERPRET loop, they don't have the desired
  4. effect because each word from the input stream is executed
  5. immediately. In this context, branching doesn't work.
  6. f IF A ELSE B THEN: if f is true, execute A, if false, execute
  7. B. ELSE is optional.
  8. BEGIN .. f UNTIL: if f is false, branch to BEGIN.
  9. BEGIN .. AGAIN: Always branch to BEGIN.
  10. x y DO .. LOOP: LOOP increments y. if y != x, branch to DO.
  11. x CASE y OF A ENDOF z OF B ENDOF C ENDCASE: If x == y, execute
  12. A, if x == z, execute B. Otherwise, execute C.
  13. (cont.)