J


j
( --- j )
"j". Return the index of the next outer do loop.
      : aword   10 0 do i . 5 0 do i . j . loop loop ;
i will range from 0 to 4 and j will range from 0 to 9 in the inner loop. i in the outer do loop is the same as j in the inner loop.

K


k
( --- k )
"k". Return the index of the second outer do loop.
   : aword   10 0 do i . 5 0 do 2 0 do i . k . loop loop loop ;
i will range from 0 to 1 and k will range from 0 to 9 in the inner loop. i in the outer-most do loop is the same as k in the inner loop.
key
( --- c )
"key". Read a character from the keyboard. It eventually calls the C function getch(). Its operation may vary slightly depending on the C compiler used. For example, some compilers may return the character immediately when typed and others not return a character until the <ENTER> key is pressed.
      : aword    begin other-words ?terminal until key ;
?terminal is typically called before key to ensure that a key is indeed ready to be read before calling key.

Table of Contents
Next Section