內容列表(Table of Contents)


6. 詞彙表(Glossary)

參閱(See): A.6 詞彙表(Glossary)


6.1 核心詞(Core words)


6.1.0010 !
儲存 CORE
        ( x a-addr -- )

將 x 存進 a-addr.

參閱: 3.3.3.1 位址對齊


6.1.0010 !
store CORE
        ( x a-addr -- )

Store x at a-addr.

See: 3.3.3.1 Address alignment


6.1.0030 #
數字符號 CORE
        ( ud1 -- ud2 )

BASE 中的數值除 ud1 而得到商 ud2 和餘數 n. (n 是 ud1 的最小有效數字). 將 n 轉換成外部的格式, 並且將結果字元加進書寫數字輸出字串的開頭. 如果 # 在一個以 <# #> 為終端的數字轉換過程之外執行時, 將會發生模稜兩可的情況.

參閱: 6.1.0050 #S


6.1.0030 #
number-sign CORE
        ( ud1 -- ud2 )

Divide ud1 by the number in BASE giving the quotient ud2 and the remainder n. (n is the least-significant digit of ud1.) Convert n to external form and add the resulting character to the beginning of the pictured numeric output string. An ambiguous condition exists if # executes outside of a <# #> delimited number conversion.

See: 6.1.0050 #S


6.1.0040 #>
數字符號大於 CORE
        ( xd -- c-addr u )

丟掉 xd. 讓書寫數字輸出字串變成一個可用的字元字串. c-addr 和 u 指定了成果的字元字串. 一個程式可以替換這個字串內的字元.

參閱: 6.1.0030 # , 6.1.0050 #S , 6.1.0490 <#


6.1.0040 #>
number-sign-greater CORE
        ( xd -- c-addr u )

Drop xd. Make the pictured numeric output string available as a character string. c-addr and u specify the resulting character string. A program may replace characters within the string.

See: 6.1.0030 # , 6.1.0050 #S , 6.1.0490 <#


6.1.0050 #S
數字符號-s CORE
        ( ud1 -- ud2 )

依照 # 的規則從 ud1 轉換一個數字. 繼續轉換直到商是零. ud2 是零. 如果 #S 在一個以 <# #> 為終端的數字轉換過程之外執行時, 將會發生模稜兩可的情況.


6.1.0050 #S
number-sign-s CORE
        ( ud1 -- ud2 )

Convert one digit of ud1 according to the rule for #. Continue conversion until the quotient is zero. ud2 is zero. An ambiguous condition exists if #S executes outside of a <# #> delimited number conversion.


6.1.0070 '
滴答 CORE
        ( "<spaces>name" -- xt )

跳過開頭的空白分界符號. 分析由空白分界的名字. 找出名稱並且回傳 xt, 然後執行名稱的代號. 如果名稱找不到將會是模稜兩可的情況.

當解譯時 ' xyz EXECUTE 將相等於 xyz.

參閱: 3.4 Forth 文字文字解譯器, 3.4.1 分析, A.6.1.2033 POSTPONE , 6.1.2510 ['] , A.6.1.0070 ' , D.6.7 即時性.


6.1.0070 '
tick CORE
        ( "<spaces>name" -- xt )

Skip leading space delimiters. Parse name delimited by a space. Find name and return xt, the execution token for name. An ambiguous condition exists if name is not found.

When interpreting, ' xyz EXECUTE is equivalent to xyz.

See: 3.4 The Forth text interpreter, 3.4.1 Parsing, A.6.1.2033 POSTPONE , 6.1.2510 ['] , A.6.1.0070 ' , D.6.7 Immediacy.


6.1.0080 (
括弧 CORE

        編譯: 執行以下給予的執行語義.

        執行: ( "ccc<paren>" -- )

分析由 ) (右括弧) 分界的 ccc. ( 是一個立即詞.

在 ccc 中的字元可以是零到分析區中字元的數目.

參閱: 3.4.1 分析, 11.6.1.0080 ( , A.6.1.0080 (


6.1.0080 (
paren CORE

        Compilation: Perform the execution semantics given below.

        Execution: ( "ccc<paren>" -- )

Parse ccc delimited by ) (right parenthesis). ( is an immediate word.

The number of characters in ccc may be zero to the number of characters in the parse area.

See: 3.4.1 Parsing, 11.6.1.0080 ( , A.6.1.0080 (


6.1.0090 *
星號 CORE
        ( n1|u1 n2|u2 -- n3|u3 )

將 n1|u1 乘以 n2|u2, 產生結果 n3|u3.


6.1.0090 *
star CORE
        ( n1|u1 n2|u2 -- n3|u3 )

Multiply n1|u1 by n2|u2 giving the product n3|u3.


6.1.0100 */
星號-反斜線 CORE
        ( n1 n2 n3 -- n4 )

將 n1 乘以 n2, 產生中介的雙單元結果 d. 將 d 除以 n3, 得到單一單元商數 n4. 當 n3 為 0 或是商 n4 位於超過一個有號數的範圍時, 將會出現模稜兩可的情況. 如果 d 和 n3 的符號不同, 實作自訂的結果所傳回之值將會跟詞組 >R M* R> FM/MOD SWAP DROP 或是 >R M* R> SM/REM SWAP DROP 相同.

參閱: 3.2.2.1 整數除法


6.1.0100 */
star-slash CORE
        ( n1 n2 n3 -- n4 )

Multiply n1 by n2 producing the intermediate double-cell result d. Divide d by n3 giving the single-cell quotient n4. An ambiguous condition exists if n3 is zero or if the quotient n4 lies outside the range of a signed number. If d and n3 differ in sign, the implementation-defined result returned will be the same as that returned by either the phrase >R M* R> FM/MOD SWAP DROP or the phrase >R M* R> SM/REM SWAP DROP .

See: 3.2.2.1 Integer division


6.1.0110 */MOD
星號-反斜線-MOD CORE
        ( n1 n2 n3 -- n4 n5 )

將 n1 乘以 n2, 產生中介的雙單元結果 d. 將 d 除以 n3, 得到單一單元餘數 n4 和得到單一單元商數 n5. 當 n3 為 0 或是商 n5 位於超過一個有號整數的範圍時, 將會出現模稜兩可的情況. 如果 d 和 n3 的符號不同, 實作自訂的結果所傳回之值將會跟詞組 >R M* R> FM/MOD >R M* R> SM/REM 相同.

參閱: 3.2.2.1 整數除法


6.1.0110 */MOD
star-slash-mod CORE
        ( n1 n2 n3 -- n4 n5 )

Multiply n1 by n2 producing the intermediate double-cell result d. Divide d by n3 producing the single-cell remainder n4 and the single-cell quotient n5. An ambiguous condition exists if n3 is zero, or if the quotient n5 lies outside the range of a single-cell signed integer. If d and n3 differ in sign, the implementation-defined result returned will be the same as that returned by either the phrase >R M* R> FM/MOD or the phrase >R M* R> SM/REM .

See: 3.2.2.1 Integer division


6.1.0120 +
加號 CORE
        ( n1|u1 n2|u2 -- n3|u3 )

將 n2|u2 加進 n1|u1, 得到結果 n3|u3.

參閱: 3.3.3.1 位址對齊


6.1.0120 +
plus CORE
        ( n1|u1 n2|u2 -- n3|u3 )

Add n2|u2 to n1|u1, giving the sum n3|u3.

See: 3.3.3.1 Address alignment


6.1.0130 +!
加號-儲存 CORE
        ( n|u a-addr -- )

將 n|u 加進在位址 a-addr 的單一單元數目.

參閱: 3.3.3.1 位址對齊


6.1.0130 +!
plus-store CORE
        ( n|u a-addr -- )

Add n|u to the single-cell number at a-addr.

See: 3.3.3.1 Address alignment


6.1.0140 +LOOP
加號-迴圈 CORE

        解譯: 這個詞的解譯語義是未定義的.

        編譯: ( C: do-sys -- )

將下列的執行時期語義加進目前的定義. 決定所有出現而未解析過的 LEAVE 的目標, LEAVE 是在由 do-sys 和 next 兩者之間的位置, 在控制的轉移之後, 要執行跟隨在 +LOOP 後的詞.

        執行時期: ( n -- ) ( R: loop-sys1 -- | loop-sys2 )

如果迴圈控制參數不存在, 將會出現模稜兩可的情況. 增加 n 到迴圈索引. 如果迴圈索引沒有跨過迴圈限制的負值和迴圈的界限, 繼續執行迴圈的開始. 否則, 拋棄目前的迴圈控制參數並且繼續執行跟隨在迴圈之後的詞.

參閱: 6.1.1240 DO , 6.1.1680 I , 6.1.1760 LEAVE , A.6.1.0140 +LOOP


6.1.0140 +LOOP
plus-loop CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Compilation: ( C: do-sys -- )

Append the run-time semantics given below to the current definition. Resolve the destination of all unresolved occurrences of LEAVE between the location given by do-sys and the next location for a transfer of control, to execute the words following +LOOP.

        Run-time: ( n -- ) ( R: loop-sys1 -- | loop-sys2 )

An ambiguous condition exists if the loop control parameters are unavailable. Add n to the loop index. If the loop index did not cross the boundary between the loop limit minus one and the loop limit, continue execution at the beginning of the loop. Otherwise, discard the current loop control parameters and continue execution immediately following the loop.

See: 6.1.1240 DO , 6.1.1680 I , 6.1.1760 LEAVE , A.6.1.0140 +LOOP


6.1.0150 ,
逗點 CORE
        ( x -- )

保留資料空間的一個單元, 並且將 x 存進這個單元. 如果資料空間指標在開始執行時是對齊的, 它將會在執行之後保持對齊. 如果資料空間指標在開始執行之前不是對齊的, 將會出現模稜兩可的情況.

參閱: 3.3.3 資料空間, 3.3.3.1 位置對齊, A.6.1.0150 ,


6.1.0150 ,
comma CORE
        ( x -- )

Reserve one cell of data space and store x in the cell. If the data-space pointer is aligned when , begins execution, it will remain aligned when , finishes execution. An ambiguous condition exists if the data-space pointer is not aligned prior to execution of ,.

See: 3.3.3 Data space, 3.3.3.1 Address alignment, A.6.1.0150 ,


6.1.0160 -
負號 CORE
        ( n1|u1 n2|u2 -- n3|u3 )

從 n1|u1 中減去 n2|u2, 得到差值 n3|u3.

參閱: 3.3.3.1 位址對齊.


6.1.0160 -
minus CORE
        ( n1|u1 n2|u2 -- n3|u3 )

Subtract n2|u2 from n1|u1, giving the difference n3|u3.

See: 3.3.3.1 Address alignment.


6.1.0180 .
句點 CORE
        ( n -- )

以自由欄位格式顯示 n.

參閱: 3.2.1.2 數字轉換, 3.2.1.3 自由欄位數字顯示.


6.1.0180 .
dot CORE
        ( n -- )

Display n in free field format.

See: 3.2.1.2 Digit conversion, 3.2.1.3 Free-field number display.


6.1.0190 ."
句點-引號 CORE

        解譯: 這個詞的解譯語義未定義. 

        編譯: ( "ccc<quote>" -- )

分析由 " (雙引號) 分界的 ccc. 將下列的執行語義加進目前的定義.

        執行語義: ( -- )

顯示 ccc.

參閱: 3.4.1 分析, 6.2.0200 .( , A.6.1.0190 ."


6.1.0190 ."
dot-quote CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Compilation: ( "ccc<quote>" -- )

Parse ccc delimited by " (double-quote). Append the run-time semantics given below to the current definition.

        Run-time: ( -- )

Display ccc.

See: 3.4.1 Parsing, 6.2.0200 .( , A.6.1.0190 ."


6.1.0230 /
除號 CORE
        ( n1 n2 -- n3 )

將 n1 除以 n2, 得到單一單元商 n3. 如果 n2 是零, 將會出現模稜兩可的情況. 如果 n1 和 n2 的符號不同, 實作自訂的結果將會傳回跟詞組 >R S>D R> FM/MOD SWAP DROP >R S>D R> SM/REM SWAP DROP 其中之一相同.

參閱: 3.2.2.1 整數除法


6.1.0230 /
slash CORE
        ( n1 n2 -- n3 )

Divide n1 by n2, giving the single-cell quotient n3. An ambiguous condition exists if n2 is zero. If n1 and n2 differ in sign, the implementation-defined result returned will be the same as that returned by either the phrase >R S>D R> FM/MOD SWAP DROP or the phrase >R S>D R> SM/REM SWAP DROP .

See: 3.2.2.1 Integer division


6.1.0240 /MOD
除號-MOD CORE
        ( n1 n2 -- n3 n4 )

將 n1 除以 n2, 得到單一單元餘數 n3 和單一單元商 n4. 如果 n2 是零, 將會出現模稜兩可的情況. 如果 n1 和 n2 的符號不同, 實作自訂的結果將會傳回跟詞組 >R S>D R> FM/MOD >R S>D R> SM/REM 其中之一相同.

See: 3.2.2.1 Integer division


6.1.0240 /MOD
slash-mod CORE
        ( n1 n2 -- n3 n4 )

Divide n1 by n2, giving the single-cell remainder n3 and the single-cell quotient n4. An ambiguous condition exists if n2 is zero. If n1 and n2 differ in sign, the implementation-defined result returned will be the same as that returned by either the phrase >R S>D R> FM/MOD or the phrase >R S>D R> SM/REM .

See: 3.2.2.1 Integer division


6.1.0250 0<
零-小於 CORE
        ( n -- flag )

只有在 n 小於零時, flag 才是真.


6.1.0250 0<
zero-less CORE
        ( n -- flag )

flag is true if and only if n is less than zero.


6.1.0270 0=
零-相等 CORE
        ( x -- flag )

只有在 n 等於零時, flag 才是真.


6.1.0270 0=
zero-equals CORE
        ( x -- flag )

flag is true if and only if x is equal to zero.


6.1.0290 1+
一-加號 CORE
        ( n1|u1 -- n2|u2 )

將一(1) 加進 n1|u1 得到總數 n2|u2.


6.1.0290 1+
one-plus CORE
        ( n1|u1 -- n2|u2 )

Add one (1) to n1|u1 giving the sum n2|u2.


6.1.0300 1-
一-減號 CORE
        ( n1|u1 -- n2|u2 )

將 n1|u1 減去一(1) 得到結果 n2|u2.


6.1.0300 1-
one-minus CORE
        ( n1|u1 -- n2|u2 )

Subtract one (1) from n1|u1 giving the difference n2|u2.


6.1.0310 2!
二-儲存 CORE
        ( x1 x2 a-addr -- )

將單元對 x1 x2 存入 a-addr, 讓 x2 在 a-addr 且 x1 在下一個連續的單元. 它相等於下列序列 SWAP OVER ! CELL+ ! .

參閱: 3.3.3.1 位址對齊


6.1.0310 2!
two-store CORE
        ( x1 x2 a-addr -- )

Store the cell pair x1 x2 at a-addr, with x2 at a-addr and x1 at the next consecutive cell. It is equivalent to the sequence SWAP OVER ! CELL+ ! .

See: 3.3.3.1 Address alignment


6.1.0320 2*
二-乘號 CORE
        ( x1 -- x2 )

x2 是將 x1 向最大有效位元位移一個位元的結果, 將空出的最小有效位元填入零.

參閱: A.6.1.0320 2*


6.1.0320 2*
two-star CORE
        ( x1 -- x2 )

x2 is the result of shifting x1 one bit toward the most-significant bit, filling the vacated least-significant bit with zero.

See: A.6.1.0320 2*


6.1.0330 2/
二-除號 CORE
        ( x1 -- x2 )

x2 是將 x1 向最小有效位元位移一個位元的結果, 保持最大有效位元不變.

參閱: A.6.1.0330 2/


6.1.0330 2/
two-slash CORE
        ( x1 -- x2 )

x2 is the result of shifting x1 one bit toward the least-significant bit, leaving the most-significant bit unchanged.

See: A.6.1.0330 2/


6.1.0350 2@
二-取得 CORE
        ( a-addr -- x1 x2 )

取得存放於 a-addr 的單元對. x2 是存放於 a-addr, 而 x1 是存放於下一個相連 的單元. 它相等於下列序列 DUP CELL+ @ SWAP @ .

參閱: 3.3.3.1 位址對齊, 6.1.0310 2! , A.6.1.0350 2@


6.1.0350 2@
two-fetch CORE
        ( a-addr -- x1 x2 )

Fetch the cell pair x1 x2 stored at a-addr. x2 is stored at a-addr and x1 at the next consecutive cell. It is equivalent to the sequence DUP CELL+ @ SWAP @ .

See: 3.3.3.1 Address alignment, 6.1.0310 2! , A.6.1.0350 2@


6.1.0370 2DROP
二-丟棄 CORE
        ( x1 x2 -- )

從堆疊丟棄單元對 x1 x2.


6.1.0370 2DROP
two-drop CORE
        ( x1 x2 -- )

Drop cell pair x1 x2 from the stack.


6.1.0380 2DUP
二-複製 CORE
        ( x1 x2 -- x1 x2 x1 x2 )

複製單元對 x1 x2.


6.1.0380 2DUP
two-dupe CORE
        ( x1 x2 -- x1 x2 x1 x2 )

Duplicate cell pair x1 x2.


6.1.0400 2OVER
二-越過 CORE
        ( x1 x2 x3 x4 -- x1 x2 x3 x4 x1 x2 )

複製單元對 x1 x2 到堆疊的最上方.


6.1.0400 2OVER
two-over CORE
        ( x1 x2 x3 x4 -- x1 x2 x3 x4 x1 x2 )

Copy cell pair x1 x2 to the top of the stack.


6.1.0430 2SWAP
二-交換 CORE
        ( x1 x2 x3 x4 -- x3 x4 x1 x2 )

交換堆疊上方的兩組單元對.


6.1.0430 2SWAP
two-swap CORE
        ( x1 x2 x3 x4 -- x3 x4 x1 x2 )

Exchange the top two cell pairs.


6.1.0450 :
冒號 CORE
        ( C: "<spaces>name" -- colon-sys )

跳過開頭的空白分界字元. 分析由空白分界的名字. 由這個名字創造一個定義, 叫做 冒號定義. 進入編譯模式, 並且開始目前的定義, 叫做 colon-sys. 將下列的初始語義加進目前的定義.

這個名字的執行語義將是由編譯進這個定義主體的詞決定. 目前的定義必須不能在詞典中找得到, 直到它結束時才可以 (或在某些系統直到執行 DOES> 時).

        初始語義: ( i*x -- i*x )  ( R:  -- nest-sys )

將有關於呼叫定義的實作自訂的 nest-sys 資訊儲存起來. 堆疊影響 i*x 代表給名字的參數.

        名字 執行: ( i*x -- j*x )

執行目前的名字. 堆疊效果 i*x 和 j*x 依序代表給予的參數和傳回的結果.

參閱: 3.4 Forth 文字解譯器, 3.4.1 分析, 3.4.5 編譯, 6.1.2500 [ , 6.1.2540 ] , 15.6.2.0470 ;CODE , A.6.1.0450 : , RFI 0005 初始語義.


6.1.0450 :
colon CORE
        ( C: "<spaces>name" -- colon-sys )

Skip leading space delimiters. Parse name delimited by a space. Create a definition for name, called a colon definition. Enter compilation state and start the current definition, producing colon-sys. Append the initiation semantics given below to the current definition.

The execution semantics of name will be determined by the words compiled into the body of the definition. The current definition shall not be findable in the dictionary until it is ended (or until the execution of DOES> in some systems).

        Initiation: ( i*x -- i*x )  ( R:  -- nest-sys )

Save implementation-dependent information nest-sys about the calling definition. The stack effects i*x represent arguments to name.

        name Execution: ( i*x -- j*x )

Execute the definition name. The stack effects i*x and j*x represent arguments to and results from name, respectively.

See: 3.4 The Forth text interpreter, 3.4.1 Parsing, 3.4.5 Compilation, 6.1.2500 [ , 6.1.2540 ] , 15.6.2.0470 ;CODE , A.6.1.0450 : , RFI 0005 Initiation semantics.


6.1.0460 ;
分號 CORE

        解譯: 這個詞的解譯語義是未定義的. 

        編譯: ( C: colon-sys -- )

將下列的執行語義附加進目前的定義. 結束目前的定義, 允許它被詞典找到, 並且進入解譯模式, 用掉 colon-sys. 如果資料空間指標是未對齊的, 保留足夠的資料空間使它對齊.

        執行時期: ( -- ) ( R: nest-sys -- )

回到由 nest-sys 指定的叫用定義.

參閱: 3.4 Forth 文字解譯器, 3.4.5 編譯, A.6.1.0460 ;


6.1.0460 ;
semicolon CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Compilation: ( C: colon-sys -- )

Append the run-time semantics below to the current definition. End the current definition, allow it to be found in the dictionary and enter interpretation state, consuming colon-sys. If the data-space pointer is not aligned, reserve enough data space to align it.

        Run-time: ( -- ) ( R: nest-sys -- )

Return to the calling definition specified by nest-sys.

See: 3.4 The Forth text interpreter, 3.4.5 Compilation, A.6.1.0460 ;


6.1.0480 <
小於 CORE
        ( n1 n2 -- flag )

如果 n1 小於 n2, 旗標為真.

參閱: 6.1.2340 U<


6.1.0480 <
less-than CORE
        ( n1 n2 -- flag )

flag is true if and only if n1 is less than n2.

See: 6.1.2340 U<


6.1.0490 <#
小於數字符號 CORE
        ( -- )

初始化書寫數字輸出轉換程序.

參閱: 6.1.0030 # , 6.1.0040 #> , 6.1.0050 #S


6.1.0490 <#
less-number-sign CORE
        ( -- )

Initialize the pictured numeric output conversion process.

See: 6.1.0030 # , 6.1.0040 #> , 6.1.0050 #S


6.1.0530 =
等號 CORE
        ( x1 x2 -- flag )

如果 x1 每一個位元跟 x2 相同, 旗標為真.


6.1.0530 =
equals CORE
        ( x1 x2 -- flag )

flag is true if and only if x1 is bit-for-bit the same as x2.


6.1.0540 >
大於 CORE
        ( n1 n2 -- flag )

如果 n1 大於 n2, 旗標為真.

參閱: 6.2.2350 U>


6.1.0540 >
greater-than CORE
        ( n1 n2 -- flag )

flag is true if and only if n1 is greater than n2.

See: 6.2.2350 U>


6.1.0550 >BODY
到-內容 CORE
        ( xt -- a-addr )

a-addr 對應到 xt 的資料欄位位址. 如果 xt 不是一個透過 CREATE 創造的詞將會發生模稜兩可的情況.

參閱: 3.3.3 資料空間, A.6.1.0550 >BODY


6.1.0550 >BODY
to-body CORE
        ( xt -- a-addr )

a-addr is the data-field address corresponding to xt. An ambiguous condition exists if xt is not for a word defined via CREATE.

See: 3.3.3 Data space, A.6.1.0550 >BODY


6.1.0560 >IN
到-in CORE
        ( -- a-addr )

a-addr 是一個包含以字元為單位, 從分析區到輸入緩衝區的開始的位移的單元的位址.


6.1.0560 >IN
to-in CORE
        ( -- a-addr )

a-addr is the address of a cell containing the offset in characters from the start of the input buffer to the start of the parse area.


6.1.0570 >NUMBER
到-數字 CORE
        ( ud1 c-addr1 u1 -- ud2 c-addr2 u2 )

ud2 是無號的從由 c-addr1 u1 所指定的字串轉換成數字的轉換結果, 是以 BASE 的數字來當基底, 並且在以 BASE 中的數字乘以 ud1 後, 加進 ud1. 轉換從左至右連續, 直到遇見一個不可轉換的字元為止, 包含遇見任何 + or - 或是字串整個地轉換. c-addr2 是第一個未轉換字元的位址, 或是當字串完全地轉換後的字串之後 的第一個字元的位址. u2 是字串中未轉換的字元的數目. 如果 ud2 在轉換中溢位, 將會有模稜兩可的情況.

參閱: 3.2.1.2 數字轉換


6.1.0570 >NUMBER
to-number CORE
        ( ud1 c-addr1 u1 -- ud2 c-addr2 u2 )

ud2 is the unsigned result of converting the characters within the string specified by c-addr1 u1 into digits, using the number in BASE, and adding each into ud1 after multiplying ud1 by the number in BASE. Conversion continues left-to-right until a character that is not convertible, including any + or -, is encountered or the string is entirely converted. c-addr2 is the location of the first unconverted character or the first character past the end of the string if the string was entirely converted. u2 is the number of unconverted characters in the string. An ambiguous condition exists if ud2 overflows during the conversion.

See: 3.2.1.2 Digit conversion


6.1.0580 >R
到-r CORE

        解譯: 這個詞的解譯語義未定義. 

        執行: ( x -- ) ( R:  -- x )

將 x 搬移到返回堆疊.

參閱: 3.2.3.3 返回堆疊, 6.1.2060 R> , 6.1.2070 R@ , 6.2.0340 2>R , 6.2.0410 2R> , 6.2.0415 2R@


6.1.0580 >R
to-r CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Execution: ( x -- ) ( R:  -- x )

Move x to the return stack.

See: 3.2.3.3 Return stack, 6.1.2060 R> , 6.1.2070 R@ , 6.2.0340 2>R , 6.2.0410 2R> , 6.2.0415 2R@


6.1.0630 ?DUP
問題-複製 CORE
        ( x -- 0 | x x )

如果 x 不是 0 則複製它.


6.1.0630 ?DUP
question-dupe CORE
        ( x -- 0 | x x )

Duplicate x if it is non-zero.


6.1.0650 @
取得 CORE
        ( a-addr -- x )

取得儲存於 a-addr 的值 x.

參閱: 3.3.3.1 位址對齊


6.1.0650 @
fetch CORE
        ( a-addr -- x )

x is the value stored at a-addr.

See: 3.3.3.1 Address alignment


6.1.0670 ABORT
CORE
        ( i*x -- ) ( R: j*x -- )

清空資料堆疊並且執行 QUIT 的功能, 而它包含不顯示任何訊息而清空返回堆疊.

參閱: 9.6.2.0670 ABORT


6.1.0670 ABORT
CORE
        ( i*x -- ) ( R: j*x -- )

Empty the data stack and perform the function of QUIT, which includes emptying the return stack, without displaying a message.

See: 9.6.2.0670 ABORT


6.1.0680 ABORT"
中斷-雙引號 CORE

        解譯: 這個詞的解譯語義未定義. 

        編譯: ( "ccc<quote>" -- )

分析由一個 " (雙引號) 分界的 ccc. 將下列的執行語義加進目前的定義中.

        執行: ( i*x x1 --  | i*x ) ( R: j*x --  | j*x )

從堆疊中移除 x1. 如果 x1 的任何位元不是零, 顯示 ccc 並且執行一個實作自訂、包含 ABORT 功能的中斷序列.

參閱: 3.4.1 分析, 9.6.2.0680 ABORT" , A.6.1.0680 ABORT"


6.1.0680 ABORT"
abort-quote CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Compilation: ( "ccc<quote>" -- )

Parse ccc delimited by a " (double-quote). Append the run-time semantics given below to the current definition.

        Run-time: ( i*x x1 --  | i*x ) ( R: j*x --  | j*x )

Remove x1 from the stack. If any bit of x1 is not zero, display ccc and perform an implementation-defined abort sequence that includes the function of ABORT.

See: 3.4.1 Parsing, 9.6.2.0680 ABORT" , A.6.1.0680 ABORT"


6.1.0690 ABS
絕對值 CORE
        ( n -- u )

u 是 n 的絕對值.


6.1.0690 ABS
abs CORE
        ( n -- u )

u is the absolute value of n.


6.1.0695 ACCEPT
CORE
        ( c-addr +n1 -- +n2 )

接收一個最多 +n1 個字元的字串. 如果 +n1 是零或是大於 32767 時 將會有模稜兩可的情況存在. 在它們被接收時顯示書寫字元. 一個依賴在字串中非書寫字元的存在或不存在的程式有環境相依性. 如果有任何的編輯函式讓系統進行依序建造這個字串, 則它是實作自訂的.

當實作自訂的行終止符號被接收時, 輸入停止. 當輸入終止時, 沒有任何東西被加進這個字串, 而顯示是以實作自訂的方式維護.

+n2 是這個儲存於 c-addr 的字串的長度.

參閱: A.6.1.0695 ACCEPT


6.1.0695 ACCEPT
CORE
        ( c-addr +n1 -- +n2 )

Receive a string of at most +n1 characters. An ambiguous condition exists if +n1 is zero or greater than 32,767. Display graphic characters as they are received. A program that depends on the presence or absence of non-graphic characters in the string has an environmental dependency. The editing functions, if any, that the system performs in order to construct the string are implementation-defined.

Input terminates when an implementation-defined line terminator is received. When input terminates, nothing is appended to the string, and the display is maintained in an implementation-defined way.

+n2 is the length of the string stored at c-addr.

See: A.6.1.0695 ACCEPT


6.1.0705 ALIGN
CORE
        ( -- )

如果資料空間指標是未對齊的, 保留足夠的空間來對齊它.

參閱: 3.3.3 資料空間, 3.3.3.1 位址對齊, A.6.1.0705 ALIGN


6.1.0705 ALIGN
CORE
        ( -- )

If the data-space pointer is not aligned, reserve enough space to align it.

See: 3.3.3 Data space, 3.3.3.1 Address alignment, A.6.1.0705 ALIGN


6.1.0706 ALIGNED
CORE
        ( addr -- a-addr )

a-addr 是第一個大於或等於 addr 的對齊的位址.

參閱: 3.3.3.1 位址對齊, 6.1.0705 ALIGN


6.1.0706 ALIGNED
CORE
        ( addr -- a-addr )

a-addr is the first aligned address greater than or equal to addr.

See: 3.3.3.1 Address alignment, 6.1.0705 ALIGN


6.1.0710 ALLOT
CORE
        ( n -- )

如果 n 是大於零, 保留資料空間中的 n 個位址單元. 如果 n 小於零, 釋放 -n 個資料空間的位址單元. 如果 n 是零, 保持資料空間指標不改變.

如果資料空間指標是對齊的, 並且當 ALLOT 開始執行時, n 是一個單元的大小的倍數, 在 ALLOT 結束執行時, 它將保持對齊的.

如果資料空間指標是字元對齊的, 並且當 ALLOT 開始執行時, n 是一個字元的大小的倍數, 在 ALLOT 結束執行時, 它將保持字元對齊的.

參閱: 3.3.3 資料空間


6.1.0710 ALLOT
CORE
        ( n -- )

If n is greater than zero, reserve n address units of data space. If n is less than zero, release |n| address units of data space. If n is zero, leave the data-space pointer unchanged.

If the data-space pointer is aligned and n is a multiple of the size of a cell when ALLOT begins execution, it will remain aligned when ALLOT finishes execution.

If the data-space pointer is character aligned and n is a multiple of the size of a character when ALLOT begins execution, it will remain character aligned when ALLOT finishes execution.

See: 3.3.3 Data space


6.1.0720 AND
CORE
        ( x1 x2 -- x3 )

x3 是位元對位元的邏輯的 x1 和 x2 之間的 and 之值.


6.1.0720 AND
CORE
        ( x1 x2 -- x3 )

x3 is the bit-by-bit logical and of x1 with x2.


6.1.0750 BASE
CORE
        ( -- a-addr )

a-addr 是一個包含目前數字轉換的基底 {{2...36}} 的單元的位址.


6.1.0750 BASE
CORE
        ( -- a-addr )

a-addr is the address of a cell containing the current number-conversion radix {{2...36}}.


6.1.0760 BEGIN
CORE

        解譯: 這個詞的解譯語義未定義. 

        編譯: ( C: -- dest )

為了控制的移轉, 將下一個位置 dest 放進流程控制堆疊中. 將下列的執行語義放進目前的定義中.

        執行: ( -- )

繼續執行.

參閱: 3.2.3.2 流程控制堆疊, 6.1.2140 REPEAT , 6.1.2390 UNTIL , 6.1.2430 WHILE , A.6.1.0760 BEGIN


6.1.0760 BEGIN
CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Compilation: ( C: -- dest )

Put the next location for a transfer of control, dest, onto the control flow stack. Append the run-time semantics given below to the current definition.

        Run-time: ( -- )

Continue execution.

See: 3.2.3.2 Control-flow stack, 6.1.2140 REPEAT , 6.1.2390 UNTIL , 6.1.2430 WHILE , A.6.1.0760 BEGIN


6.1.0770 BL
b-l CORE
        ( -- char )

char 是一個空白的字元值.

參閱: A.6.1.0770 BL


6.1.0770 BL
b-l CORE
        ( -- char )

char is the character value for a space.

See: A.6.1.0770 BL


6.1.0850 C!
c-儲存 CORE
        ( char c-addr -- )

儲存 char 於 c-addr. 當字元的大小是小於單元大小時, 只有對應到字元的低順序的位元被傳送.

參閱: 3.3.3.1 位址對齊


6.1.0850 C!
c-store CORE
        ( char c-addr -- )

Store char at c-addr. When character size is smaller than cell size, only the number of low-order bits corresponding to character size are transferred.

See: 3.3.3.1 Address alignment


6.1.0860 C,
c-逗號 CORE
        ( char -- )

保留資料空間的一個字元空間, 並且將 char 存進這個空間. 如果資料空間指標在 C, 開始執行是對齊的, 它將會在 C, 執行之後保持對齊. 如果資料空間指標在開始執行 C, 之前不是字元對齊的, 將會出現模稜兩可的情況.

參閱: 3.3.3 資料空間, 3.3.3.1 位置對齊.


6.1.0860 C,
c-comma CORE
        ( char -- )

Reserve space for one character in the data space and store char in the space. If the data-space pointer is character aligned when C, begins execution, it will remain character aligned when C, finishes execution. An ambiguous condition exists if the data-space pointer is not character-aligned prior to execution of C,.

See: 3.3.3 Data space, 3.3.3.1 Address alignment.


6.1.0870 C@
c-取得 CORE
        ( c-addr -- char )

取得儲存於 c-addr 的字元. 當單元大小是大於字元大小時, 未用到的高順序位元都是零.

參閱: 3.3.3.1 位址對齊


6.1.0870 C@
c-fetch CORE
        ( c-addr -- char )

Fetch the character stored at c-addr. When the cell size is greater than character size, the unused high-order bits are all zeroes.

See: 3.3.3.1 Address alignment


6.1.0880 CELL+
CORE
        ( a-addr1 -- a-addr2 )

增加一個單元的大小在位址單元 a-addr1, 得到 a-addr2.

參閱: 3.3.3.1 位址對齊, A.6.1.0880 CELL+


6.1.0880 CELL+
CORE
        ( a-addr1 -- a-addr2 )

Add the size in address units of a cell to a-addr1, giving a-addr2.

See: 3.3.3.1 Address alignment, A.6.1.0880 CELL+


6.1.0890 CELLS
CORE
        ( n1 -- n2 )

n2 是 n1 單元的位址單元大小.

參閱: A.6.1.0890 CELLS


6.1.0890 CELLS
CORE
        ( n1 -- n2 )

n2 is the size in address units of n1 cells.

See: A.6.1.0890 CELLS


6.1.0895 CHAR
字元 CORE
        ( "<spaces>name" -- char )

跳過開頭的空白分界符號. 分析由一個空白分界的名字. 將它的第一個字元放進堆疊中.

參閱: 3.4.1 分析, 6.1.2520 [CHAR] , A.6.1.0895 CHAR


6.1.0895 CHAR
char CORE
        ( "<spaces>name" -- char )

Skip leading space delimiters. Parse name delimited by a space. Put the value of its first character onto the stack.

See: 3.4.1 Parsing, 6.1.2520 [CHAR] , A.6.1.0895 CHAR


6.1.0897 CHAR+
字元-加 CORE
        ( c-addr1 -- c-addr2 )

將位址單元 c-addr1 增加一個字元的大小, 得到 c-addr2.

參閱: 3.3.3.1 位址對齊


6.1.0897 CHAR+
char-plus CORE
        ( c-addr1 -- c-addr2 )

Add the size in address units of a character to c-addr1, giving c-addr2.

See: 3.3.3.1 Address alignment


6.1.0898 CHARS
許多字元 CORE
        ( n1 -- n2 )

n2 是 n1 個字元的位址單元的大小.


6.1.0898 CHARS
chars CORE
        ( n1 -- n2 )

n2 is the size in address units of n1 characters.


6.1.0950 CONSTANT
CORE
        ( x "<spaces>name" -- )

跳過開頭的空白分界字元. 分析由一個空白字元分界的名稱. 用這個名稱創造一個定義, 而這個字義有下列的執行語義.

name 將會以一個 constant 的型式被參考.

        name 執行: ( -- x )

將 x 放進堆疊中.

參閱: 3.4.1 分析, A.6.1.0950 CONSTANT


6.1.0950 CONSTANT
CORE
        ( x "<spaces>name" -- )

Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below.

name is referred to as a constant.

        name Execution: ( -- x )

Place x on the stack.

See: 3.4.1 Parsing, A.6.1.0950 CONSTANT


6.1.0980 COUNT
CORE
        ( c-addr1 -- c-addr2 u )

回傳儲存於 c-addr1 的計數字串的字元字串規格. c-addr2 是在 c-addr1 後的第一個字元的位址. u 是在 c-addr1 的字元內容, 它是以字元為單位的 c-addr2 字串的長度.


6.1.0980 COUNT
CORE
        ( c-addr1 -- c-addr2 u )

Return the character string specification for the counted string stored at c-addr1. c-addr2 is the address of the first character after c-addr1. u is the contents of the character at c-addr1, which is the length in characters of the string at c-addr2.


6.1.0990 CR
c-r CORE
        ( -- )

導致接著的輸出出現在下一行的開頭.


6.1.0990 CR
c-r CORE
        ( -- )

Cause subsequent output to appear at the beginning of the next line.


6.1.1000 CREATE
CORE
        ( "<spaces>name" -- )

跳過開頭的空白分界字元. 分析由一個空白分界的名稱. 為這個名稱創造一個定義, 讓這個定義有下列設定的執行語義. 如果資料空間指標是未對齊的, 保留足夠的資料空間來對齊它. 新的資料空間指標指定了名稱的資料欄位. CREATE 不會在名稱的資料欄位配置資料空間.

        名稱 執行: ( -- a-addr )

a-addr 是名稱的資料欄位的位址. 名稱的執行語義可以使用 DOES> 來延伸.

參閱: 3.3.3 資料空間, A.6.1.1000 CREATE


6.1.1000 CREATE
CORE
        ( "<spaces>name" -- )

Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below. If the data-space pointer is not aligned, reserve enough data space to align it. The new data-space pointer defines name's data field. CREATE does not allocate data space in name's data field.

        name Execution: ( -- a-addr )

a-addr is the address of name's data field. The execution semantics of name may be extended by using DOES>.

See: 3.3.3 Data space, A.6.1.1000 CREATE


6.1.1170 DECIMAL
CORE
        ( -- )

設定數字轉換基底為十(十進位).


6.1.1170 DECIMAL
CORE
        ( -- )

Set the numeric conversion radix to ten (decimal).


6.1.1200 DEPTH
CORE
        ( -- +n )

+n 是一個在 +n 放置在堆疊前包含在資料堆疊上的單一單元數值的數量.


6.1.1200 DEPTH
CORE
        ( -- +n )

+n is the number of single-cell values contained in the data stack before +n was placed on the stack.


6.1.1240 DO
CORE

        解譯: 這個詞的解譯語義是未定義的. 

        編譯: ( C: -- do-sys )

將 do-sys 放在控制流程堆疊之上. 將下列的執行時期語義加到目前定義之後. 這個語義是不完全的, 直到 do-sys 的消費者解決, 例如 LOOP.

        執行時期: ( n1|u1 n2|u2 -- ) ( R: -- loop-sys )

由索引 n2|u2 和極限 n1|u1 來設定迴圈控制參數. 如果 n1|u1 和 n2|u2 不是相同的型別將會出現模稜兩可的情況. 任何已經在返回堆疊上的事物變成暫時無法使用, 直到迴圈參數被拋棄.

參閱: 3.2.3.2 控制流程堆疊, 6.1.0140 +LOOP , A.6.1.1240 DO


6.1.1240 DO
CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Compilation: ( C: -- do-sys )

Place do-sys onto the control-flow stack. Append the run-time semantics given below to the current definition. The semantics are incomplete until resolved by a consumer of do-sys such as LOOP.

        Run-time: ( n1|u1 n2|u2 -- ) ( R: -- loop-sys )

Set up loop control parameters with index n2|u2 and limit n1|u1. An ambiguous condition exists if n1|u1 and n2|u2 are not both the same type. Anything already on the return stack becomes unavailable until the loop-control parameters are discarded.

See: 3.2.3.2 Control-flow stack, 6.1.0140 +LOOP , A.6.1.1240 DO


6.1.1250 DOES>
CORE

        解譯: 這個詞的解譯語義是未定義的. 

        編譯: ( C: colon-sys1 -- colon-sys2 )

將下列的執行語義加進目前的定義. 是否編譯 DOES> 會讓目前的定義成為在詞典可找到的是實作自訂的. 吸收 colon-sys1 並且產生 colon-sys2. 將下列的初始語義加進目前的定義中.

        執行時期: ( -- ) ( R: nest-sys1 -- )

替換最近的定義中的執行語義, 以 name 來參考, 有下列的 name 執行語義. 回到呼叫的定義是由 nest-sys1 指定. 如果名稱不是由 CREATE 或使用者自訂的呼叫 CREATE 的詞來設定的將會有模稜兩可的情況.

        初始: ( i*x -- i*x a-addr ) ( R:  -- nest-sys2 )

儲存有關於呼叫定義的實作相依的資訊 nest-sys2. 放置名稱的資料欄位位址在堆疊上. 堆疊影響了 i*x 代表參數給名稱.

        name 執行: ( i*x -- j*x )

執行定義的開始於初始語義的部分 執行定義的一部分, 開始於由 DOES> 修改名稱時加進的初始語義. 堆疊影響 i*x 和 j*x 分別代表給 name 的參數和傳回的結果.

參閱: A.6.1.1250 DOES> , RFI 0003 定義詞等等, RFI 0005 初始語義.


6.1.1250 DOES>
does CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Compilation: ( C: colon-sys1 -- colon-sys2 )

Append the run-time semantics below to the current definition. Whether or not the current definition is rendered findable in the dictionary by the compilation of DOES> is implementation defined. Consume colon-sys1 and produce colon-sys2. Append the initiation semantics given below to the current definition.

        Run-time: ( -- ) ( R: nest-sys1 -- )

Replace the execution semantics of the most recent definition, referred to as name, with the name execution semantics given below. Return control to the calling definition specified by nest-sys1. An ambiguous condition exists if name was not defined with CREATE or a user-defined word that calls CREATE.

        Initiation: ( i*x -- i*x a-addr ) ( R:  -- nest-sys2 )

Save implementation-dependent information nest-sys2 about the calling definition. Place name's data field address on the stack. The stack effects i*x represent arguments to name.

        name Execution: ( i*x -- j*x )

Execute the portion of the definition that begins with the initiation semantics appended by the DOES> which modified name. The stack effects i*x and j*x represent arguments to and results from name, respectively.

See: A.6.1.1250 DOES> , RFI 0003 Defining words etc., RFI 0005 Initiation semantics.


6.1.1260 DROP
CORE
        ( x -- )

從堆疊移除 x.


6.1.1260 DROP
CORE
        ( x -- )

Remove x from the stack.


6.1.1290 DUP
複製 CORE
        ( x -- x x )

複製 x.


6.1.1290 DUP
dupe CORE
        ( x -- x x )

Duplicate x.


6.1.1310 ELSE
CORE

        解譯: 這個詞的解譯語義是未定義的. 

        編譯: ( C: orig1 -- orig2 )

將一個新的、未解析出的向前參考 orig2 放進流程控制堆疊中. 將下列的執行時期語義加進目前的定義. 這個語義在 orig2 被解析出之前都是未完全的 (例如, 由 THEN). 用隨後加進的執行時期語義來解析向前參考的 orig1.

        執行時期: ( -- )

在 orig2 決定的位置繼續執行.

參閱: 6.1.1700 IF , A.6.1.1310 ELSE


6.1.1310 ELSE
CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Compilation: ( C: orig1 -- orig2 )

Put the location of a new unresolved forward reference orig2 onto the control flow stack. Append the run-time semantics given below to the current definition. The semantics will be incomplete until orig2 is resolved (e.g., by THEN). Resolve the forward reference orig1 using the location following the appended run-time semantics.

        Run-time: ( -- )

Continue execution at the location given by the resolution of orig2.

See: 6.1.1700 IF , A.6.1.1310 ELSE


6.1.1320 EMIT
CORE
        ( x -- )

如果 x 是一個在實作自訂字元集中的書寫字元, 則顯示 x. 對於其他所有 x 值的 EMIT 影響是實作自訂的.

當傳送一個字元的定義位元有一個包括於十六進位 20 和 7E 之值時, 對應的由 3.1.2.1 書寫字元 所指定的標準字元將會被顯示. 因為不同的輸出裝置可以對於控制字元產生不同的回應, 使用控制字元來進行特定功能的程式有一個環境相依性. 每一個 EMIT 只處理一個字元.

參閱: 6.1.2310 TYPE


6.1.1320 EMIT
CORE
        ( x -- )

If x is a graphic character in the implementation-defined character set, display x. The effect of EMIT for all other values of x is implementation-defined.

When passed a character whose character-defining bits have a value between hex 20 and 7E inclusive, the corresponding standard character, specified by 3.1.2.1 Graphic characters, is displayed. Because different output devices can respond differently to control characters, programs that use control characters to perform specific functions have an environmental dependency. Each EMIT deals with only one character.

See: 6.1.2310 TYPE


6.1.1345 ENVIRONMENT?
環境-訊問 CORE
        ( c-addr u -- false | i*x true )

c-addr 是一個字元字串的位址, 而 u 是這個字串的字元計數值. u 可以有一個從範圍零到一個實作自訂最大值之間的數值, 但是它必須不小於 31. 這個字元字串應該包含一個從 3.2.6 環境的詢問 或是選用詞集 來的關鍵字, 設定檢驗記號來符合現在環境的一項屬性. 如果這個系統認為這項屬性是未知的, 返回旗標為假; 否則旗標為真, 而傳回的 i*x 是指定於屬性查詢表中的規格.

參閱: A.6.1.1345 ENVIRONMENT?


6.1.1345 ENVIRONMENT?
environment-query CORE
        ( c-addr u -- false | i*x true )

c-addr is the address of a character string and u is the string's character count. u may have a value in the range from zero to an implementation-defined maximum which shall not be less than 31. The character string should contain a keyword from 3.2.6 Environmental queries or the optional word sets to be checked for correspondence with an attribute of the present environment. If the system treats the attribute as unknown, the returned flag is false; otherwise, the flag is true and the i*x returned is of the type specified in the table for the attribute queried.

See: A.6.1.1345 ENVIRONMENT?


6.1.1360 EVALUATE
CORE
        ( i*x c-addr u -- j*x )

儲存目前的輸入來源明細. 如果它存在, 將負一(-1)儲存進 SOURCE-ID 中. 將由 c-addr 和 u 描述的字串當成輸入來源和輸入緩衝區, 設定 >IN 為零, 並且解譯. 當分析區是空的時, 回存前面的輸入來源明細. 其他的堆疊影響是依據被 EVALUATE 的詞決定.

參閱: 7.6.1.1360 EVALUATE , A.6.1.1360 EVALUATE , RFI 0006 寫入到輸入緩衝區.


6.1.1360 EVALUATE
CORE
        ( i*x c-addr u -- j*x )

Save the current input source specification. Store minus-one (-1) in SOURCE-ID if it is present. Make the string described by c-addr and u both the input source and input buffer, set >IN to zero, and interpret. When the parse area is empty, restore the prior input source specification. Other stack effects are due to the words EVALUATEd.

See: 7.6.1.1360 EVALUATE , A.6.1.1360 EVALUATE , RFI 0006 Writing to Input Buffers.


6.1.1370 EXECUTE
CORE
        ( i*x xt -- j*x )

從堆疊中移除 x1, 並且進行由它指定的語義. 其他的堆疊影響是依據被 EXECUTE 的詞而定.

參閱: 6.1.0070 ' , 6.1.2510 [']


6.1.1370 EXECUTE
CORE
        ( i*x xt -- j*x )

Remove xt from the stack and perform the semantics identified by it. Other stack effects are due to the word EXECUTEd.

See: 6.1.0070 ' , 6.1.2510 [']


6.1.1380 EXIT
CORE

        解譯: 這個詞的解譯語義是未定義的. 

        執行: ( -- ) ( R: nest-sys -- )

將控制權交還給由 nest-sys 指定的叫用定義. 在一個 do-loop 中執行 EXIT 之前, 一個程式必須執行 UNLOOP 來拋棄迴圈控制參數.

參閱: 3.2.3.3 返回堆疊, A.6.1.1380 EXIT


6.1.1380 EXIT
CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Execution: ( -- ) ( R: nest-sys -- )

Return control to the calling definition specified by nest-sys. Before executing EXIT within a do-loop, a program shall discard the loop-control parameters by executing UNLOOP.

See: 3.2.3.3 Return stack, A.6.1.1380 EXIT


6.1.1540 FILL
CORE
        ( c-addr u char -- )

如果 u 大於零, 將 char 存入從記憶體 c-addr 開始的每一個連續的字元.


6.1.1540 FILL
CORE
        ( c-addr u char -- )

If u is greater than zero, store char in each of u consecutive characters of memory beginning at c-addr.


6.1.1550 FIND
CORE
        ( c-addr -- c-addr 0  |  xt 1  |  xt -1 )

找出在位址 c-addr 的計數字串命名的定義. 如果找不到定義, 傳回 c-addr 和零. 如果找到了定義, 傳回它的執行記號 xt. 如果這個定義是立即地, 也傳回一 (1), 否則也傳回負一 (-1). 對於一個給定的字串, 在編譯時由 FIND 傳回的數值可以跟不是編譯時傳回的不同.

參閱: 3.4.2 找出定義名稱, 6.1.0070 ' , 6.1.2510 ['] , A.6.1.1550 FIND , A.6.1.2033 POSTPONE , D.6.7 即時性.


6.1.1550 FIND
CORE
        ( c-addr -- c-addr 0  |  xt 1  |  xt -1 )

Find the definition named in the counted string at c-addr. If the definition is not found, return c-addr and zero. If the definition is found, return its execution token xt. If the definition is immediate, also return one (1), otherwise also return minus-one (-1). For a given string, the values returned by FIND while compiling may differ from those returned while not compiling.

See: 3.4.2 Finding definition names, 6.1.0070 ' , 6.1.2510 ['] , A.6.1.1550 FIND , A.6.1.2033 POSTPONE , D.6.7 Immediacy.


6.1.1561 FM/MOD
f-m-反斜線-mod CORE
        ( d1 n1 -- n2 n3 )

用 d1 除以 n1, 得到底限商 n3 和餘數 n2. 輸入和輸出的堆疊參數是有號數. 如果 n1 是零或是商位於一個單一單元有號整數的範圍之外時, 會出現模稜兩可的情況.

參閱: 3.2.2.1 整數除法, 6.1.2214 SM/REM , 6.1.2370 UM/MOD , A.6.1.1561 FM/MOD


6.1.1561 FM/MOD
f-m-slash-mod CORE
        ( d1 n1 -- n2 n3 )

Divide d1 by n1, giving the floored quotient n3 and the remainder n2. Input and output stack arguments are signed. An ambiguous condition exists if n1 is zero or if the quotient lies outside the range of a single-cell signed integer.

See: 3.2.2.1 Integer division, 6.1.2214 SM/REM , 6.1.2370 UM/MOD , A.6.1.1561 FM/MOD


6.1.1650 HERE
CORE
        ( -- addr )

addr 是資料空間指標.

參閱: 3.3.3.2 連續區域


6.1.1650 HERE
CORE
        ( -- addr )

addr is the data-space pointer.

See: 3.3.3.2 Contiguous regions


6.1.1670 HOLD
CORE
        ( char -- )

將 char 加進書寫數字輸出字串的開頭. 如果 HOLD 在 <# #> 分界的數字轉換的範圍之外執行時, 會出現模稜兩可的情況.


6.1.1670 HOLD
CORE
        ( char -- )

Add char to the beginning of the pictured numeric output string. An ambiguous condition exists if HOLD executes outside of a <# #> delimited number conversion.


6.1.1680 I
CORE

        解譯: 這個詞的解譯語義是未定義的. 

        執行: ( -- n|u ) ( R:  loop-sys -- loop-sys )

n|u 是目前 (最內層) 迴圈索引值的複本. 如果沒有迴圈控制參數存在時, 將會出現模稜兩可的情況.


6.1.1680 I
CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Execution: ( -- n|u ) ( R:  loop-sys -- loop-sys )

n|u is a copy of the current (innermost) loop index. An ambiguous condition exists if the loop control parameters are unavailable.


6.1.1700 IF
CORE

        解譯: 這個詞的解譯語義是未定義的. 

        編譯: ( C: -- orig )

將一個新的、未解析出的向前參考 orig 放進流程控制堆疊中. 將下列的執行時期語義加進目前的定義. 這個語義在 orig 被解析出之前都是未完全的. 例如, 由 THENELSE.

        執行時期: ( x -- )

如果 x 的所有位元都是零, 從 orig 決定的位置繼續執行.

參閱: 3.2.3.2 流程控制堆疊, A.6.1.1700 IF


6.1.1700 IF
CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Compilation: ( C: -- orig )

Put the location of a new unresolved forward reference orig onto the control flow stack. Append the run-time semantics given below to the current definition. The semantics are incomplete until orig is resolved, e.g., by THEN or ELSE.

        Run-time: ( x -- )

If all bits of x are zero, continue execution at the location specified by the resolution of orig.

See: 3.2.3.2 Control flow stack, A.6.1.1700 IF


6.1.1710 IMMEDIATE
CORE
        ( -- )

將最近的定義變成一個立即詞. 如果最近的定義沒有一個名稱時, 將會發生模稜兩可的情況.

參閱: A.6.1.1710 IMMEDIATE , D.6.7 即時性, RFI 0007"即時性""特別編譯語義" 之間的差別.


6.1.1710 IMMEDIATE
CORE
        ( -- )

Make the most recent definition an immediate word. An ambiguous condition exists if the most recent definition does not have a name.

See: A.6.1.1710 IMMEDIATE , D.6.7 Immediacy, RFI 0007 Distinction between immediacy and special compilation semantics.


6.1.1720 INVERT
CORE
        ( x1 -- x2 )

反轉 x1 的所有位元, 得到它的邏輯負數 x2.

參閱: 6.1.1910 NEGATE , 6.1.0270 0= , A.6.1.1720 INVERT


6.1.1720 INVERT
CORE
        ( x1 -- x2 )

Invert all bits of x1, giving its logical inverse x2.

See: 6.1.1910 NEGATE , 6.1.0270 0= , A.6.1.1720 INVERT


6.1.1730 J
CORE

        解譯: 這個詞的解譯語義是未定義的. 

        執行: ( -- n|u ) ( R: loop-sys1 loop-sys2 -- loop-sys1 loop-sys2 )

n|u 是下一個外層的迴圈索引值的複本. 如果沒有下一個外層的迴圈控制參數 loop-sys1 存在時, 將會出現模稜兩可的情況.

參閱: A.6.1.1730 J


6.1.1730 J
CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Execution: ( -- n|u ) ( R: loop-sys1 loop-sys2 -- loop-sys1 loop-sys2 )

n|u is a copy of the next-outer loop index. An ambiguous condition exists if the loop control parameters of the next-outer loop, loop-sys1, are unavailable.

See: A.6.1.1730 J


6.1.1750 KEY
CORE
        ( -- char )

接收一個字元 char, 一個實作自訂字元集的成員. 未對應到這樣的字元的鍵盤事件將會被丟棄, 直到接收到一個正確的字元, 而這些事件以後也不提供.

所有的標準字元都可以接收. 由 KEY 接收的字元將不會被顯示.

所有由 KEY 傳回的標準字元有指定於 3.1.2.1 書寫字元 的數字數值. 需要接收控制字元的程式有環境相依性.

參閱: 10.6.2.1305 EKEY , 10.6.1.1755 KEY?


6.1.1750 KEY
CORE
        ( -- char )

Receive one character char, a member of the implementation-defined character set. Keyboard events that do not correspond to such characters are discarded until a valid character is received, and those events are subsequently unavailable.

All standard characters can be received. Characters received by KEY are not displayed.

Any standard character returned by KEY has the numeric value specified in 3.1.2.1 Graphic characters. Programs that require the ability to receive control characters have an environmental dependency.

See: 10.6.2.1305 EKEY , 10.6.1.1755 KEY?


6.1.1760 LEAVE
CORE

        解譯: 這個詞的解譯語義是未定義的. 

        執行: ( -- ) ( R: loop-sys -- )

丟棄目前的迴圈控制參數. 如果它們未被提供時, 會出現模稜兩可的情況. 立即繼續執行在句法包圍 DO ... LOOP 或 DO ... +LOOP 之後的程式碼.

參閱: 3.2.3.3 返回堆疊, A.6.1.1760 LEAVE


6.1.1760 LEAVE
CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Execution: ( -- ) ( R: loop-sys -- )

Discard the current loop control parameters. An ambiguous condition exists if they are unavailable. Continue execution immediately following the innermost syntactically enclosing DO ... LOOP or DO ... +LOOP.

See: 3.2.3.3 Return stack, A.6.1.1760 LEAVE


6.1.1780 LITERAL
CORE

        解譯: 這個詞的解譯語義是未定義的. 

        編譯: ( x -- )

將下列給予的執行時期語義加進目前的定義.

        執行時期: ( -- x )

將 x 放進堆疊.

參閱: A.6.1.1780 LITERAL


6.1.1780 LITERAL
CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Compilation: ( x -- )

Append the run-time semantics given below to the current definition.

        Run-time: ( -- x )

Place x on the stack.

See: A.6.1.1780 LITERAL


6.1.1800 LOOP
CORE

        解譯: 這個詞的解譯語義是未定義的. 

        編譯: ( C: do-sys -- )

將下列的執行時期語義加進目前的定義. 決定所有出現而未解析過的 LEAVE 目標, LEAVE 是在由 do-sys 和 next 兩者之間的位置, 在控制的轉移之後, 要執行跟隨在 LOOP 後的詞.

        執行時期: ( -- ) ( R:  loop-sys1 --  | loop-sys2 )

如果迴圈控制參數不存在, 將會出現模稜兩可的情況. 增加 1 到迴圈索引. 如果迴圈索引接著等於迴圈限制, 拋棄目前的迴圈控制參數並且繼續執行跟隨在迴圈之後的詞. 否則繼續從迴圈的開始位置執行.

參閱: 6.1.1240 DO , 6.1.1680 I , A.6.1.1800 LOOP


6.1.1800 LOOP
CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Compilation: ( C: do-sys -- )

Append the run-time semantics given below to the current definition. Resolve the destination of all unresolved occurrences of LEAVE between the location given by do-sys and the next location for a transfer of control, to execute the words following the LOOP.

        Run-time: ( -- ) ( R:  loop-sys1 --  | loop-sys2 )

An ambiguous condition exists if the loop control parameters are unavailable. Add one to the loop index. If the loop index is then equal to the loop limit, discard the loop parameters and continue execution immediately following the loop. Otherwise continue execution at the beginning of the loop.

See: 6.1.1240 DO , 6.1.1680 I , A.6.1.1800 LOOP


6.1.1805 LSHIFT
l-位移 CORE
        ( x1 u -- x2 )

對於 x1 進行一個邏輯的左位移 u 位元, 得到 x2. 將空出的最小有效位元填入零. 如果 u 大於等於一個單元的位元數目時, 將會出現模稜兩可的情況.


6.1.1805 LSHIFT
l-shift CORE
        ( x1 u -- x2 )

Perform a logical left shift of u bit-places on x1, giving x2. Put zeroes into the least significant bits vacated by the shift. An ambiguous condition exists if u is greater than or equal to the number of bits in a cell.


6.1.1810 M*
m-星號 CORE
        ( n1 n2 -- d )

d 是 n1 乘 n2 的有號數產品.

參閱: A.6.1.1810 M*


6.1.1810 M*
m-star CORE
        ( n1 n2 -- d )

d is the signed product of n1 times n2.

See: A.6.1.1810 M*


6.1.1870 MAX
CORE
        ( n1 n2 -- n3 )

n3 是 n1 和 n2 中較大的數值.


6.1.1870 MAX
CORE
        ( n1 n2 -- n3 )

n3 is the greater of n1 and n2.


6.1.1880 MIN
CORE
        ( n1 n2 -- n3 )

n3 是 n1 和 n2 中較小的數值.


6.1.1880 MIN
CORE
        ( n1 n2 -- n3 )

n3 is the lesser of n1 and n2.


6.1.1890 MOD
CORE
        ( n1 n2 -- n3 )

將 n1 除以 n2, 得到單一單元餘數 n3. 如果 n2 是零時將會出現模稜兩可的情況. 如果 n1 和 n2 符號不同, 實作自訂傳回的結果將等於下列詞組 >R S>D R> FM/MOD DROP>R S>D R> SM/REM DROP.

參閱: 3.2.2.1 整數除法


6.1.1890 MOD
CORE
        ( n1 n2 -- n3 )

Divide n1 by n2, giving the single-cell remainder n3. An ambiguous condition exists if n2 is zero. If n1 and n2 differ in sign, the implementation-defined result returned will be the same as that returned by either the phrase >R S>D R> FM/MOD DROP or the phrase >R S>D R> SM/REM DROP.

See: 3.2.2.1 Integer division


6.1.1900 MOVE
CORE
        ( addr1 addr2 u -- )

如果 u 大於零, 將位址 addr1 的連續 u 個位址單元複製至 addr2 的位址的連續 u 個位址單元. 在 MOVE 完成後, 在 u2 的 u 個連續的位址單元完全地包含在移動之前 u1 的 u 個連續的位址單元.

參閱: 17.6.1.0910 CMOVE , 17.6.1.0920 CMOVE> , A.6.1.1900 MOVE


6.1.1900 MOVE
CORE
        ( addr1 addr2 u -- )

If u is greater than zero, copy the contents of u consecutive address units at addr1 to the u consecutive address units at addr2. After MOVE completes, the u consecutive address units at addr2 contain exactly what the u consecutive address units at addr1 contained before the move.

See: 17.6.1.0910 CMOVE , 17.6.1.0920 CMOVE> , A.6.1.1900 MOVE


6.1.1910 NEGATE
CORE
        ( n1 -- n2 )

否定 n1, 得到它的算術負數 n2.

參閱: 6.1.1720 INVERT , 6.1.0270 0=


6.1.1910 NEGATE
CORE
        ( n1 -- n2 )

Negate n1, giving its arithmetic inverse n2.

See: 6.1.1720 INVERT , 6.1.0270 0=


6.1.1980 OR
CORE
        ( x1 x2 -- x3 )

x3 是 x1 和 x2 的位元對位元包含式的或的結果.


6.1.1980 OR
CORE
        ( x1 x2 -- x3 )

x3 is the bit-by-bit inclusive-or of x1 with x2.


6.1.1990 OVER
CORE
        ( x1 x2 -- x1 x2 x1 )

在堆疊的上方放置一份 x1 的複本.


6.1.1990 OVER
CORE
        ( x1 x2 -- x1 x2 x1 )

Place a copy of x1 on top of the stack.


6.1.2033 POSTPONE
CORE

        解譯: 這個詞的解譯語義是未定義的. 

        編譯: ( "<spaces>name" -- )

跳過開頭的空白分界. 分析由一個空白分界的名稱. 找到 name. 將 name 的編譯語義加進目前的定義. 如果 name 找不到時將會有模稜兩可的情況.

參閱: D.6.7 立即性, 3.4.1 分析, A.6.1.2033 POSTPONE , 6.2.2530 [COMPILE]


6.1.2033 POSTPONE
CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Compilation: ( "<spaces>name" -- )

Skip leading space delimiters. Parse name delimited by a space. Find name. Append the compilation semantics of name to the current definition. An ambiguous condition exists if name is not found.

See: D.6.7 Immediacy, 3.4.1 Parsing, A.6.1.2033 POSTPONE , 6.2.2530 [COMPILE]


6.1.2050 QUIT
CORE
        ( -- )  ( R:  i*x -- )

清空返回堆疊, 如果 SOURCE-ID 存在, 將零存入, 讓使用者輸入裝置是輸入的來源, 並且進入解譯模式. 不要顯示訊息. 重複下列的動作:

參閱: 3.4 Forth 文字解譯器


6.1.2050 QUIT
CORE
        ( -- )  ( R:  i*x -- )

Empty the return stack, store zero in SOURCE-ID if it is present, make the user input device the input source, and enter interpretation state. Do not display a message. Repeat the following:

See: 3.4 The Forth text interpreter


6.1.2060 R>
r-從 CORE

        解譯: 這個詞的解譯語義是未定義的. 

        執行: ( -- x ) ( R:  x -- )

將 x 從返回堆疊搬到資料堆疊.

參閱: 3.2.3.3 返回堆疊, 6.1.0580 >R , 6.1.2070 R@ , 6.2.0340 2>R , 6.2.0410 2R> , 6.2.0415 2R@


6.1.2060 R>
r-from CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Execution: ( -- x ) ( R:  x -- )

Move x from the return stack to the data stack.

See: 3.2.3.3 Return stack, 6.1.0580 >R , 6.1.2070 R@ , 6.2.0340 2>R , 6.2.0410 2R> , 6.2.0415 2R@


6.1.2070 R@
r-取得 CORE

        解譯: 這個詞的解譯語義是未定義的. 

        執行: ( -- x ) ( R:  x -- x )

將 x 從返回堆疊複製一份至資料堆疊.

參閱: 3.2.3.3 返回堆疊, 6.1.0580 >R , 6.1.2060 R> , 6.2.0340 2>R , 6.2.0410 2R> , 6.2.0415 2R@


6.1.2070 R@
r-fetch CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Execution: ( -- x ) ( R:  x -- x )

Copy x from the return stack to the data stack.

See: 3.2.3.3 Return stack, 6.1.0580 >R , 6.1.2060 R> , 6.2.0340 2>R , 6.2.0410 2R> , 6.2.0415 2R@


6.1.2120 RECURSE
CORE

        解譯: 這個詞的解譯語義是未定義的. 

        編譯: ( -- )

將目前定義的執行語義加進目前的定義內. 如果 RECURSE 在一個定義的 DOES> 之後出現, 將會發生模稜兩可的情況.

參閱: 6.1.2120 RECURSE , A.6.1.2120 RECURSE


6.1.2120 RECURSE
CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Compilation: ( -- )

Append the execution semantics of the current definition to the current definition. An ambiguous condition exists if RECURSE appears in a definition after DOES>.

See: 6.1.2120 RECURSE , A.6.1.2120 RECURSE


6.1.2140 REPEAT
CORE

        解譯: 這個詞的解譯語義是未定義的. 

        編譯: ( C: orig dest -- )

將下列的執行時期語義加入目前的定義, 解析向後參考 dest. 用跟隨的附加的執行時期語義位置來解析向前參考 orig.

        執行時期: ( -- )

繼續執行由 dest 給定的位置.

參閱: 6.1.0760 BEGIN , 6.1.2430 WHILE , A.6.1.2140 REPEAT


6.1.2140 REPEAT
CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Compilation: ( C: orig dest -- )

Append the run-time semantics given below to the current definition, resolving the backward reference dest. Resolve the forward reference orig using the location following the appended run-time semantics.

        Run-time: ( -- )

Continue execution at the location given by dest.

See: 6.1.0760 BEGIN , 6.1.2430 WHILE , A.6.1.2140 REPEAT


6.1.2160 ROT
旋轉 CORE
        ( x1 x2 x3 -- x2 x3 x1 )

旋轉堆疊上面的三個記錄.


6.1.2160 ROT
rote CORE
        ( x1 x2 x3 -- x2 x3 x1 )

Rotate the top three stack entries.


6.1.2162 RSHIFT
r-位移 CORE
        ( x1 u -- x2 )

對於 x1 進行一個邏輯的右位移 u 位元, 得到 x2. 將位移空出的最小有效位元填入零. 如果 u 大於等於一個單元的位元數目時, 將會出現模稜兩可的情況.


6.1.2162 RSHIFT
r-shift CORE
        ( x1 u -- x2 )

Perform a logical right shift of u bit-places on x1, giving x2. Put zeroes into the most significant bits vacated by the shift. An ambiguous condition exists if u is greater than or equal to the number of bits in a cell.


6.1.2165 S"
s-quote CORE

        解譯: 這個詞的解譯語義是未定義的. 

        編譯: ( "ccc<quote>" -- )

以 " (雙引號) 為分界來分析 ccc. 將下列的執行語義加進目前的定義.

        執行時期: ( -- c-addr u )

回傳由 c-addr 和 u 描述的字串, 它由 ccc 字元組成. 一個程式必須不替換這個傳回的字串.

參閱: 3.4.1 分析, 6.2.0855 C" , 11.6.1.2165 S" , A.6.1.2165 S"


6.1.2165 S"
s-quote CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Compilation: ( "ccc<quote>" -- )

Parse ccc delimited by " (double-quote). Append the run-time semantics given below to the current definition.

        Run-time: ( -- c-addr u )

Return c-addr and u describing a string consisting of the characters ccc. A program shall not alter the returned string.

See: 3.4.1 Parsing, 6.2.0855 C" , 11.6.1.2165 S" , A.6.1.2165 S"


6.1.2170 S>D
s-to-d CORE
        ( n -- d )

將數值 n 轉換成相同的數值的雙單元數字 d.


6.1.2170 S>D
s-to-d CORE
        ( n -- d )

Convert the number n to the double-cell number d with the same numerical value.


6.1.2210 SIGN
CORE
        ( n -- )

如果 n 是負數, 增加一個負號在書寫數字輸出字串的前面. 如果 SIGN 在 <# #> 分界的數字轉換之外執行時, 將會發生模稜兩可的情況.


6.1.2210 SIGN
CORE
        ( n -- )

If n is negative, add a minus sign to the beginning of the pictured numeric output string. An ambiguous condition exists if SIGN executes outside of a <# #> delimited number conversion.


6.1.2214 SM/REM
s-m-反斜線-rem CORE
        ( d1 n1 -- n2 n3 )

將 d1 除以 n1, 得到對稱除法商 n3 和餘數 n2. 輸入和輸出堆疊參數是有號的. 如果 n1 是零或是商位於一個單一單元有號整數的範圍之外時, 會出現模稜兩可的情況.

參閱: 3.2.2.1 整數除法, 6.1.1561 FM/MOD , 6.1.2370 UM/MOD , A.6.1.2214 SM/REM


6.1.2214 SM/REM
s-m-slash-rem CORE
        ( d1 n1 -- n2 n3 )

Divide d1 by n1, giving the symmetric quotient n3 and the remainder n2. Input and output stack arguments are signed. An ambiguous condition exists if n1 is zero or if the quotient lies outside the range of a single-cell signed integer.

See: 3.2.2.1 Integer division, 6.1.1561 FM/MOD , 6.1.2370 UM/MOD , A.6.1.2214 SM/REM


6.1.2216 SOURCE
CORE
        ( -- c-addr u )

c-addr 是輸入緩衝區的位置, 而 u 是它內含的字元數目.

參閱: A.6.1.2216 SOURCE , RFI 0006 寫入到輸入緩衝區.


6.1.2216 SOURCE
CORE
        ( -- c-addr u )

c-addr is the address of, and u is the number of characters in, the input buffer.

See: A.6.1.2216 SOURCE , RFI 0006 Writing to Input Buffers.


6.1.2220 SPACE
CORE
        ( -- )

顯示一個空白.


6.1.2220 SPACE
CORE
        ( -- )

Display one space.


6.1.2230 SPACES
CORE
        ( n -- )

如果 n 大於零, 顯示 n 個空白.


6.1.2230 SPACES
CORE
        ( n -- )

If n is greater than zero, display n spaces.


6.1.2250 STATE
CORE
        ( -- a-addr )

a-addr 是一個單元的位址, 包含了編譯狀態旗標. 當 STATE 是真時, 就是在編譯狀態, 是假時則不是. 在 STATE 中的真是非零值, 但它是另外的實作自訂值. 只有下列的標準詞修改 STATE 中之值: (colon), ; (semicolon), ABORT, QUIT, :NONAME, [ (left-bracket), 和 ] (right-bracket).

注意: 一個程式必須不直接修改 STATE 的內部.

參閱: 3.4 Forth 文字解譯器, 15.6.2.2250 STATE , A.6.1.2250 STATE , RFI 0007"即時性""特別編譯語義" 之間的差別.


6.1.2250 STATE
CORE
        ( -- a-addr )

a-addr is the address of a cell containing the compilation-state flag. STATE is true when in compilation state, false otherwise. The true value in STATE is non-zero, but is otherwise implementation-defined. Only the following standard words alter the value in STATE: : (colon), ; (semicolon), ABORT, QUIT, :NONAME, [ (left-bracket), and ] (right-bracket).

Note: A program shall not directly alter the contents of STATE.

See: 3.4 The Forth text interpreter, 15.6.2.2250 STATE , A.6.1.2250 STATE , RFI 0007 Distinction between immediacy and special compilation semantics.


6.1.2260 SWAP
CORE
        ( x1 x2 -- x2 x1 )

交換最上面的兩個堆疊元素.


6.1.2260 SWAP
CORE
        ( x1 x2 -- x2 x1 )

Exchange the top two stack items.


6.1.2270 THEN
CORE

        解譯: 這個詞的解譯語義是未定義的. 

        編譯: ( C: orig -- )

將下列給予的執行時期語義加進目前的定義. 用隨後加進的執行時期語義來解析向前參考的 orig.

        執行時期: ( -- )

繼續執行.

參閱: 6.1.1310 ELSE , 6.1.1700 IF , A.6.1.2270 THEN


6.1.2270 THEN
CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Compilation: ( C: orig -- )

Append the run-time semantics given below to the current definition. Resolve the forward reference orig using the location of the appended run-time semantics.

        Run-time: ( -- )

Continue execution.

See: 6.1.1310 ELSE , 6.1.1700 IF , A.6.1.2270 THEN


6.1.2310 TYPE
CORE
        ( c-addr u -- )

如果 u 大於零, 顯示 c-addr 和 u 指令的字元字串.

當傳送一個字元字串中的字元, 而它的字元定義位元有一個包含於 十六進位 20 和 7E 的數值時, 由 3.1.2.1 書寫字元 所指定的對應標準字元將會被顯示. 因為不同的輸出裝置可以對控制字元產生不同的回應, 用控制字元來進行特別功能的程式有環境的相依性.

參閱: 6.1.1320 EMIT


6.1.2310 TYPE
CORE
        ( c-addr u -- )

If u is greater than zero, display the character string specified by c-addr and u.

When passed a character in a character string whose character-defining bits have a value between hex 20 and 7E inclusive, the corresponding standard character, specified by 3.1.2.1 graphic characters, is displayed. Because different output devices can respond differently to control characters, programs that use control characters to perform specific functions have an environmental dependency.

See: 6.1.1320 EMIT


6.1.2320 U.
u-句點 CORE
        ( u -- )

以自由欄位格式來顯示 u.


6.1.2320 U.
u-dot CORE
        ( u -- )

Display u in free field format.


6.1.2340 U<
u-小於-比 CORE
        ( u1 u2 -- flag )

只有在 u1 小於 u2 時, flag 才為真.

參閱: 6.1.0480 <


6.1.2340 U<
u-less-than CORE
        ( u1 u2 -- flag )

flag is true if and only if u1 is less than u2.

See: 6.1.0480 <


6.1.2360 UM*
u-m-星號 CORE
        ( u1 u2 -- ud )

以 u1 乘以 u2, 得到無號的雙單元結果 ud. 所有的數值和算術是無號的.


6.1.2360 UM*
u-m-star CORE
        ( u1 u2 -- ud )

Multiply u1 by u2, giving the unsigned double-cell product ud. All values and arithmetic are unsigned.


6.1.2370 UM/MOD
u-m-反斜線-mod CORE
        ( ud u1 -- u2 u3 )

用 ud1 除以 u1, 得到商 u3 和餘數 u2. 所有的數值和算術是無號的. 如果 u1 是零或是商位於一個單一單元無號整數的範圍之外時, 會出現模稜兩可的情況.

參閱: 3.2.2.1 整數除法, 6.1.1561 FM/MOD , 6.1.2214 SM/REM


6.1.2370 UM/MOD
u-m-slash-mod CORE
        ( ud u1 -- u2 u3 )

Divide ud by u1, giving the quotient u3 and the remainder u2. All values and arithmetic are unsigned. An ambiguous condition exists if u1 is zero or if the quotient lies outside the range of a single-cell unsigned integer.

See: 3.2.2.1 Integer division, 6.1.1561 FM/MOD , 6.1.2214 SM/REM


6.1.2380 UNLOOP
CORE

        解譯: 這個詞的解譯語義是未定義的. 

        執行: ( -- ) ( R: loop-sys -- )

丟棄目前巢狀等級的迴圈控制參數. 在定義可以被 EXIT 之前, 每一估巢狀等級需要一個 UNLOOP. 如果迴圈控制參數不存在時, 會出現模稜兩可的情況.

參閱: 3.2.3.3 返回堆疊, A.6.1.2380 UNLOOP


6.1.2380 UNLOOP
CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Execution: ( -- ) ( R: loop-sys -- )

Discard the loop-control parameters for the current nesting level. An UNLOOP is required for each nesting level before the definition may be EXITed. An ambiguous condition exists if the loop-control parameters are unavailable.

See: 3.2.3.3 Return stack, A.6.1.2380 UNLOOP


6.1.2390 UNTIL
CORE

        解譯: 這個詞的解譯語義是未定義的. 

        編譯: ( C: dest -- )

將下列給予的執行時期語義加入到目前定義, 解析向後參考 dest.

        執行時期: ( x -- )

如果 x 的所有位元都是零, 繼續執行 dest 所指定的位址.

參閱: 6.1.0760 BEGIN , A.6.1.2390 UNTIL


6.1.2390 UNTIL
CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Compilation: ( C: dest -- )

Append the run-time semantics given below to the current definition, resolving the backward reference dest.

        Run-time: ( x -- )

If all bits of x are zero, continue execution at the location specified by dest.

See: 6.1.0760 BEGIN , A.6.1.2390 UNTIL


6.1.2410 VARIABLE
CORE
        ( "<spaces>name" -- )

跳過開頭的空白分界符號. 分析由一個空白分析的 name. 為 name 造出一個定義, 包含了下列給予的執行語義. 在對齊的位址保留一個資料空間的一個單元.

name 被參考為一個 變數.

        name 執行: ( -- a-addr )

a-addr 是保留單元的位址. 一個程式有責任的初始化這個保留單元的內容.

參閱: 3.4.1 分析, A.6.1.2410 VARIABLE


6.1.2410 VARIABLE
CORE
        ( "<spaces>name" -- )

Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below. Reserve one cell of data space at an aligned address.

name is referred to as a variable.

        name Execution: ( -- a-addr )

a-addr is the address of the reserved cell. A program is responsible for initializing the contents of the reserved cell.

See: 3.4.1 Parsing, A.6.1.2410 VARIABLE


6.1.2430 WHILE
CORE

        解譯: 這個詞的解譯語義是未定義的. 

        編譯: ( C: dest -- orig dest )

將新的未解析的向前參考 orig 放進流程控制堆疊中, 在存在的 dest 之下. 將下列給予的執行時期語義加入目前的定義. 這語義是不完全的直到 orig 和 dest 被解析. (例如, 由 REPEAT).

        執行時期: ( x -- )

如果 x 的所有位元是零, 繼續執行由 orig 決定的位置.

參閱: A.6.1.2430 WHILE


6.1.2430 WHILE
CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Compilation: ( C: dest -- orig dest )

Put the location of a new unresolved forward reference orig onto the control flow stack, under the existing dest. Append the run-time semantics given below to the current definition. The semantics are incomplete until orig and dest are resolved (e.g., by REPEAT).

        Run-time: ( x -- )

If all bits of x are zero, continue execution at the location specified by the resolution of orig.

See: A.6.1.2430 WHILE


6.1.2450 WORD
CORE
        ( char "<chars>ccc<char>" -- c-addr )

跳過開頭的分界符號. 分析出由 char 分界的字元 ccc. 如果分析後的字串大於實作自訂的一個計數字串的長度時, 將會發生模稜兩可的情況.

c-addr 是一個計數字串在暫時的區域的位址, 包含了這個被分析出的詞. 如果分析區是空的或是除了分界符號之外沒有包含其他字元, 產生的字串長度為零. 不包含在長度之中的一個空白會跟隨在字串後. 一個程式可以修改在這個字串中的字元.

注意: 需要在這個字串後加一個空白是將廢棄的, 並且是被包含為已存在的使用 CONVERT 的程式的妥協. 一個程式必須不依靠這個空白的存在.

參閱: 3.3.3.6 其他暫時的區域, 3.4.1 分析, 6.2.2008 PARSE , A.6.1.2450 WORD


6.1.2450 WORD
CORE
        ( char "<chars>ccc<char>" -- c-addr )

Skip leading delimiters. Parse characters ccc delimited by char. An ambiguous condition exists if the length of the parsed string is greater than the implementation-defined length of a counted string.

c-addr is the address of a transient region containing the parsed word as a counted string. If the parse area was empty or contained no characters other than the delimiter, the resulting string has a zero length. A space, not included in the length, follows the string. A program may replace characters within the string.

Note: The requirement to follow the string with a space is obsolescent and is included as a concession to existing programs that use CONVERT. A program shall not depend on the existence of the space.

See: 3.3.3.6 Other transient regions, 3.4.1 Parsing, 6.2.2008 PARSE , A.6.1.2450 WORD


6.1.2490 XOR
x-or CORE
        ( x1 x2 -- x3 )

x3 是位元對位元的 x1 和 x2 排外或後之值.


6.1.2490 XOR
x-or CORE
        ( x1 x2 -- x3 )

x3 is the bit-by-bit exclusive-or of x1 with x2.


6.1.2500 [
左括弧 CORE

        解譯: 這個詞的解譯語義是未定義的. 

        編譯: 執行下列給予的執行語義. 

        執行: ( -- )

進入解譯模式. [ 是一個立即詞.

參閱: 3.4 文字文字解譯器, 3.4.5 編譯, 6.1.2540 ] , A.6.1.2500 [


6.1.2500 [
left-bracket CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Compilation: Perform the execution semantics given below.

        Execution: ( -- )

Enter interpretation state. [ is an immediate word.

See: 3.4 The Forth text interpreter, 3.4.5 Compilation, 6.1.2540 ] , A.6.1.2500 [


6.1.2510 [']
括弧-滴答 CORE

        解譯: 這個詞的解譯語義是未定義的. 

        編譯: ( "<spaces>name" -- )

跳過開頭的空白分界符號. 分析由一個空白分界的 name. 找出 name. 將下列給予的執行語義加進目前的定義.

如果 name 找不到將會發生模稜兩可的情況.

        執行時期: ( -- xt )

將 name 的執行代號 xt 放置於堆疊上. 由編譯詞組 ['] X 傳回的執行代號相同於 ' X 在編譯狀態之外傳回的值.

參閱: 3.4.1 分析, 6.1.0070 ' , A.6.1.2033 POSTPONE , A.6.1.2510 ['] , D.6.7 立即性.


6.1.2510 [']
bracket-tick CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Compilation: ( "<spaces>name" -- )

Skip leading space delimiters. Parse name delimited by a space. Find name. Append the run-time semantics given below to the current definition.

An ambiguous condition exists if name is not found.

        Run-time: ( -- xt )

Place name's execution token xt on the stack. The execution token returned by the compiled phrase ['] X is the same value returned by ' X outside of compilation state.

See: 3.4.1 Parsing, 6.1.0070 ' , A.6.1.2033 POSTPONE , A.6.1.2510 ['] , D.6.7 Immediacy.


6.1.2520 [CHAR]
括弧-字元 CORE

        解譯: 這個詞的解譯語義是未定義的. 

        編譯: ( "<spaces>name" -- )

跳過開頭的空白分界符號. 分析由一個空白分界的 name. 將下列給予的執行語義加入到目前的定義中.

        執行時期: ( -- char )

將 char, name 的第一個字元的數值放置於堆疊上.

參閱: 3.4.1 分析, 6.1.0895 CHAR , A.6.1.2520 [CHAR]


6.1.2520 [CHAR]
bracket-char CORE

        Interpretation: Interpretation semantics for this word are undefined.

        Compilation: ( "<spaces>name" -- )

Skip leading space delimiters. Parse name delimited by a space. Append the run-time semantics given below to the current definition.

        Run-time: ( -- char )

Place char, the value of the first character of name, on the stack.

See: 3.4.1 Parsing, 6.1.0895 CHAR , A.6.1.2520 [CHAR]


6.1.2540 ]
右-括弧 CORE
        ( -- )

進入編譯狀態.

參閱: 3.4 Forth 文字文字解譯器, 3.4.5 編譯, 6.1.2500 [ , A.6.1.2540 ] ,


6.1.2540 ]
right-bracket CORE
        ( -- )

Enter compilation state.

See: 3.4 The Forth text interpreter, 3.4.5 Compilation, 6.1.2500 [ , A.6.1.2540 ] ,


6.2 核心延伸詞(Core extension words)

參閱(See): A.6.2 核心延伸詞(Core extension words)


6.2.0060 #TIB
數字符號-t-i-b CORE EXT
        ( -- a-addr )

a-addr 是一個單元的位址, 它包含了在終端輸入緩衝區的字元數目.

注意: 這個詞是過時的, 並且是對於已存在的實作的妥協.

參閱: A.6.2.0060 #TIB


6.2.0060 #TIB
number-t-i-b CORE EXT
        ( -- a-addr )

a-addr is the address of a cell containing the number of characters in the terminal input buffer.

Note: This word is obsolescent and is included as a concession to existing implementations.

See: A.6.2.0060 #TIB


6.2.0200 .(
句點-括弧 CORE EXT

        編譯: 執行下列給予的執行語義. 

        執行: ( "ccc<paren>" -- )

分析並顯示由 ) (右括弧) 分界的 ccc. .( 是一個立即詞.

參閱: 3.4.1 分析, 6.1.0190 ." , A.6.2.0200 .(


6.2.0200 .(
dot-paren CORE EXT

        Compilation: Perform the execution semantics given below.

        Execution: ( "ccc<paren>" -- )

Parse and display ccc delimited by ) (right parenthesis). .( is an immediate word.

See: 3.4.1 Parsing, 6.1.0190 ." , A.6.2.0200 .(


6.2.0210 .R
句點-r CORE EXT
        ( n1 n2 -- )

以欄位為 n2 個字元寬的方式顯示右對齊的 n1. 如果需要用來顯示 n1 的字元數目大於 n2, 所有的數字會以必要的寬度來顯示出來, 而沒有開頭的空白.

參閱: A.6.2.0210 .R


6.2.0210 .R
dot-r CORE EXT
        ( n1 n2 -- )

Display n1 right aligned in a field n2 characters wide. If the number of characters required to display n1 is greater than n2, all digits are displayed with no leading spaces in a field as wide as necessary.

See: A.6.2.0210 .R


6.2.0260 0<>
零-不-等於 CORE EXT
        ( x -- flag )

如果 x 不等於零, flag 為真.


6.2.0260 0<>
zero-not-equals CORE EXT
        ( x -- flag )

flag is true if and only if x is not equal to zero.


6.2.0280 0>
零-大於 CORE EXT
        ( n -- flag )

只有在 n 大於零時, flag 才是真.


6.2.0280 0>
zero-greater CORE EXT
        ( n -- flag )

flag is true if and only if n is greater than zero.


6.2.0340 2>R
二-到-r CORE EXT

        解譯: 這個詞的解譯語義是未定義的. 

        執行: ( x1 x2 -- ) ( R:  -- x1 x2 )

傳送單元對 x1 x2 到返回堆疊. 語意相等於 SWAP >R >R .

參閱: 3.2.3.3 返回堆疊, 6.1.0580 >R , 6.1.2060 R> , 6.1.2070 R@ , 6.2.0410 2R> , 6.2.0415 2R@ , A.6.2.0340 2>R


6.2.0340 2>R
two-to-r CORE EXT

        Interpretation: Interpretation semantics for this word are undefined.

        Execution: ( x1 x2 -- ) ( R:  -- x1 x2 )

Transfer cell pair x1 x2 to the return stack. Semantically equivalent to SWAP >R >R .

See: 3.2.3.3 Return stack, 6.1.0580 >R , 6.1.2060 R> , 6.1.2070 R@ , 6.2.0410 2R> , 6.2.0415 2R@ , A.6.2.0340 2>R


6.2.0410 2R>
二-r-從 CORE EXT

        解譯: 這個詞的解譯語義是未定義的. 

        執行: ( -- x1 x2 ) ( R:  x1 x2 -- )

從返回堆疊傳送單元對 x1 x2. 語意相等於 R> R> SWAP .

參閱: 3.2.3.3 返回堆疊, 6.1.0580 >R , 6.1.2060 R> , 6.1.2070 R@ , 6.2.0340 2>R , 6.2.0415 2R@ , A.6.2.0410 2R>


6.2.0410 2R>
two-r-from CORE EXT

        Interpretation: Interpretation semantics for this word are undefined.

        Execution: ( -- x1 x2 ) ( R:  x1 x2 -- )

Transfer cell pair x1 x2 from the return stack. Semantically equivalent to R> R> SWAP .

See: 3.2.3.3 Return stack, 6.1.0580 >R , 6.1.2060 R> , 6.1.2070 R@ , 6.2.0340 2>R , 6.2.0415 2R@ , A.6.2.0410 2R>


6.2.0415 2R@
二-r-取得 CORE EXT

        解譯: 這個詞的解譯語義是未定義的. 

        執行: ( -- x1 x2 ) ( R:  x1 x2 -- x1 x2 )

從返回堆疊複製單元對 x1 x2. 語意相等於 R> R> 2DUP >R >R SWAP .

參閱: 3.2.3.3 返回堆疊, 6.1.0580 >R , 6.1.2060 R> , 6.1.2070 R@ , 6.2.0340 2>R , 6.2.0410 2R>


6.2.0415 2R@
two-r-fetch CORE EXT

        Interpretation: Interpretation semantics for this word are undefined.

        Execution: ( -- x1 x2 ) ( R:  x1 x2 -- x1 x2 )

Copy cell pair x1 x2 from the return stack. Semantically equivalent to R> R> 2DUP >R >R SWAP .

See: 3.2.3.3 Return stack, 6.1.0580 >R , 6.1.2060 R> , 6.1.2070 R@ , 6.2.0340 2>R , 6.2.0410 2R>


6.2.0455 :NONAME
冒號-無-名 CORE EXT
        ( C:  -- colon-sys )  ( S:  -- xt )

創造一個執行符號 xt, 進入編譯狀態並且開始目前的定義, 產生 colon-sys. 加入下列給予的初始語義到目前的定義.

xt 的執行語義將被編譯進入這定義內容的詞決定. 這個定義可以稍後被用 EXECUTE 來執行.

如果流程控制堆疊是以資料堆疊實作, colon-sys 必須是在資料堆疊上的最上層元素.

        初始: ( i*x -- i*x ) ( R:  -- nest-sys )

儲存有關於呼叫定義的實作相關資訊 nest-sys. 堆疊影響 i*x 代表給 xt 的參數.

        xt 執行: ( i*x -- j*x )

執行由 xt 指定的定義. 堆疊影響 i*x 和 j*x 依序分別代表參數和傳回的結果.

參閱: A.6.2.0455 :NONAME , 3.2.3.2 流程控制堆疊.


6.2.0455 :NONAME
colon-no-name CORE EXT
        ( C:  -- colon-sys )  ( S:  -- xt )

Create an execution token xt, enter compilation state and start the current definition, producing colon-sys. Append the initiation semantics given below to the current definition.

The execution semantics of xt will be determined by the words compiled into the body of the definition. This definition can be executed later by using xt EXECUTE.

If the control-flow stack is implemented using the data stack, colon-sys shall be the topmost item on the data stack.

        Initiation: ( i*x -- i*x ) ( R:  -- nest-sys )

Save implementation-dependent information nest-sys about the calling definition. The stack effects i*x represent arguments to xt.

        xt Execution: ( i*x -- j*x )

Execute the definition specified by xt. The stack effects i*x and j*x represent arguments to and results from xt, respectively.

See: A.6.2.0455 :NONAME , 3.2.3.2 Control-flow stack.


6.2.0500 <>
不-等於 CORE EXT
        ( x1 x2 -- flag )

如果 x1 不是位元對位元的與 x2 相等時, flag 為真.