LEAVE: различия между версиями

Материал из ПМК вики
Перейти к навигации Перейти к поиску
Нет описания правки
Нет описания правки
Строка 35: Строка 35:
           nested within the do-loop structure.  More than one LEAVE
           nested within the do-loop structure.  More than one LEAVE
           may appear within a do-loop.  See:  "9.3 Return Stack"
           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.





Версия от 15:36, 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.


Ссылки


  У этой статьи нет иллюстраций. Вы можете помочь проекту, добавив их.


  Это заготовка статьи. Вы можете помочь проекту, дополнив её.