Vytvoření proměnné variable one variable two Uložení hodnoty do proměnné 1 one ! 2 two ! 1 1 + two ! Získání hodnoty z proměnné one @ . cr two @ . cr Tisk hodnoty proměnné a @ . a ? Logické hodnoty a logické operace true . false . Unární a binární logické operace true false and . false not . true not . true true false and xor . : & and ; : | or ; : ^ xor ; false . false not . false not not . true . true not . true not not . Pravdivostní tabulky binárních logických operací : pravdivostni_tabulka ." Operace and" cr false false and . cr true false and . cr false true and . cr true true and . cr ." Operace or" cr false false or . cr true false or . cr false true or . cr true true or . cr ." Operace xor" cr false false xor . cr true false xor . cr false true xor . cr true true xor . cr ; Relační operátory 1 2 <> . 1 2 = . 1 2 < . 1 2 <= . 1 2 > . 1 2 >= . 1 5 < 5 100 < and . true false < . cr true false > . cr false true < . cr false true > . cr Rekurze : factorial dup 0= if drop 1 else dup 1- factorial * then ; Smyčky s testem na začátku begin podmínka while tělo smyčky repeat : pokus 0 begin dup 10 < while 1 + dup . cr repeat drop ; Smyčky s testem na konci begin tělo smyčky podmínka until : lcd (nejmensi spol. delitel) begin swap over mod dup 0= until drop . cr ; 10 15 lcd 20 21 lcd 384 1024 lcd Nekonečné smyčky begin tělo smyčky again : infinite_loop begin ." looping" cr again ; nekonečné smyčky s podmíněným ukončením : infinite_loop2 0 begin 1 + dup . cr dup 10 > if abort then again ; : infinite_loop3 1 begin 2 * dup . cr dup 10000 > if abort then again ;