Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
重複の可能性: 無限ループまたは if ステートメントの Forth 言語 EBNF ルール
Forth while ループ (またはその他のループ) を記述するEBNFルールはありますか?
BEGIN <code> WHILE <code> REPEAT— 最初の<code>ブロックを実行し、スタックの上に残っているものをすべて消費します。ゼロ以外の場合、2 番目の<code>ブロックが実行され、すべてが最初からやり直されます。ゼロの場合、実行は の後にスキップしREPEATます。これは定義内でのみ使用できることに注意してください (例: " : foo ... ;")。
BEGIN <code> WHILE <code> REPEAT
<code>
REPEAT
: foo ... ;