LEAVE: различия между версиями
Перейти к навигации
Перейти к поиску
AtH (обсуждение | вклад) |
AtH (обсуждение | вклад) Нет описания правки |
||
Строка 44: | Строка 44: | ||
proceeds normally until the loop terminating word is | proceeds normally until the loop terminating word is | ||
encountered. | encountered. | ||
== LEAVE в fig-FORTH Release 1 glossary, май 1979 (англ.) == | |||
LEAVE C,L0 | |||
Force termination of a DO-LOOP at the next opportunity by setting | |||
the loop limit equal to the current value of the index. The index | |||
itself remains unchanged, and execution proceeds normally until LOOP | |||
or +LOOP is encountered. | |||
== Ссылки == | == Ссылки == |
Версия от 21:20, 7 сентября 2015
LEAVE — стандартное слово Каллисто.
Досрочно прерывает цикл FOR .. NEXT (только для области данных)
LEAVE в стандарте ANS Forth
6.1.1760 LEAVE CORE Интерпретация: Семантика интерпретации для этого слова не определена.
Выполнение: ( -- ) ( R: loop-sys -- ) Снимает текущие параметры управления циклом. Неопределенная ситуация существует, если они недоступны. Продолжает выполнение непосредственно вне самого внутреннего синтаксически окруженного DO ... LOOP или DO ... +LOOP.
См.: 3.2.3.3 Стек возвратов, 6.1.0140 +LOOP, 6.1.1800 LOOP.
A.6.1.1760 LEAVE Заметьте, что LEAVE немедленно завершает цикл. Никакие слова после LEAVE в пределах цикла не будут выполнены. Типичное использование: : X ... DO ... IF ... LEAVE THEN ... LOOP ... ;
LEAVE в предыдущем стандарте Forth-83 (англ.)
LEAVE -- C,I,83 -- (compiling) Transfers execution to just beyond the next LOOP or +LOOP . The loop is terminated and loop control parameters are discarded. May only be used in the form: DO ... LEAVE ... LOOP or DO ... LEAVE ... +LOOP LEAVE may appear within other control structures which are nested within the do-loop structure. More than one LEAVE may appear within a do-loop. See: "9.3 Return Stack"
LEAVE в стандарте Forth-79 (англ.)
LEAVE C,213 Force termination of a DO-LOOP at the next LOOP or +LOOP by setting the loop limit equal to the current value of the index. The index itself remains unchanged, and execution proceeds normally until the loop terminating word is encountered.
LEAVE в fig-FORTH Release 1 glossary, май 1979 (англ.)
LEAVE C,L0 Force termination of a DO-LOOP at the next opportunity by setting the loop limit equal to the current value of the index. The index itself remains unchanged, and execution proceeds normally until LOOP or +LOOP is encountered.
Ссылки
- Слово LEAVE в стандарте ANS Forth (англ.) и комментарий к нему (англ.)
- Слово LEAVE в черновике Forth 200x (англ.) и комментарий к нему (англ.)
- См. также слово UNLOOP
У этой статьи нет иллюстраций. Вы можете помочь проекту, добавив их. |
Это заготовка статьи. Вы можете помочь проекту, дополнив её. |