內容列表(Table of Contents)


10. 選用的設備詞(The optional Facility word set)


10.1 簡介(Introduction)


10.2 附加的專有名詞和記號(Additional terms and notation)

無(None).


10.3 附加的使用需求(Additional usage requirements)


10.3.1 字元型別(Character types)

10.6.2.1305 EKEY 在一個字元中使用超過七個位元的程式有環境相似性.

Programs that use more than seven bits of a character by 10.6.2.1305 EKEY have an environmental dependency.

參閱(See): 3.1.2 字元型別(Character types)


10.3.2 環境的詢問(Environmental queries)

將表格 10.1 加進表格 3.5.

Append table 10.1 to table 3.5.

參閱(See): 3.2.6 環境的詢問(Environmental queries)

表格 10.1 - 環境詢問字串

字串            值     資料型別   常數?       意義
------          ---------------   ---------   -------
FACILITY        flag              no          設備詞集存在
FACILITY-EXT    flag              no          設備延伸詞集存在

Table 10.1 - Environmental query strings

String          Value data type   Constant?   Meaning
------          ---------------   ---------   -------
FACILITY        flag              no          facility word set present
FACILITY-EXT    flag              no          facility extensions word set present


10.4 附加的文件需求(Additional documentation requirements)


10.4.1 系統文件(System documentation)


10.4.1.1 實作自訂選項(Implementation-defined options)


10.4.1.2 模稜兩可的情況(Ambiguous conditions)


10.4.1.3 其他的系統文件(Other system documentation)


10.4.2 程式文件(Program documentation)


10.4.2.1 環境相依性(Environmental dependencies)

由 10.6.2.1305 EKEY 使用超過一個字元中超過七個位元的程式有環境相似性.


10.4.2.2 其他程式文件(Other program documentation)


10.5 遵守標準和命名(Compliance and labeling)


10.5.1 ANS Forth 系統(ANS Forth systems)

措辭 提供設備詞集 必須被加到任何提供設備詞集的標準系統的描述之中.

The phrase Providing the Facility word set shall be appended to the label of any Standard System that provides all of the Facility word set.

措辭 從設備延伸詞集提供 name(s) 必須被加到任何提供部分設備延伸詞集的標準系統的描述之中.

The phrase Providing name(s) from the Facility Extensions word set shall be appended to the label of any Standard System that provides portions of the Facility Extensions word set.

措辭 提供設備延伸詞集 必須被加到任何提供所有設備詞集和設備延伸詞集的標準系統的描述之中.

The phrase Providing the Facility Extensions word set shall be appended to the label of any Standard System that provides all of the Facility and Facility Extensions word sets.


10.5.2 ANS Forth 程式(ANS Forth programs)

措辭 需要設備詞集 必須被加到任何需要系統提供設備詞集的標準程式的描述之中.

The phrase Requiring the Facility word set shall be appended to the label of Standard Programs that require the system to provide the Facility word set.

措辭 需要設備延伸詞集中的 name(s) 必須被加到任何需要系統提供部分設備延伸詞集的標準程式的描述之中.

The phrase Requiring name(s) from the Facility Extensions word set shall be appended to the label of Standard Programs that require the system to provide portions of the Facility Extensions word set.

措辭 需要設備延伸詞集 必須被加到任何需要系統提供所有設備和設備延伸詞集的標準程式的描述之中.

The phrase Requiring the Facility Extensions word set shall be appended to the label of Standard Programs that require the system to provide all of the Facility and Facility Extensions word sets.


10.6 詞彙表(Glossary)


10.6.1 設備詞(Facility words)


10.6.1.0742 AT-XY
在-x-y FACILITY
	( u1 u2 -- )

進行實作相依步驟, 因而下一個顯示的字元將出現於使用者輸出裝置的行 u1, 列 u2, 這裝置的左上角是行零, 列零. 如果這項操作不能用指定的參數進行於使用者輸出裝置, 將會有模稜兩可的情況存在.

參閱: A.10.6.1.0742 AT-XY


10.6.1.0742 AT-XY
at-x-y FACILITY
	( u1 u2 -- )

Perform implementation-dependent steps so that the next character displayed will appear in column u1, row u2 of the user output device, the upper left corner of which is column zero, row zero. An ambiguous condition exists if the operation cannot be performed on the user output device with the specified parameters.

See: A.10.6.1.0742 AT-XY


10.6.1.1755 KEY?
key-問號 FACILITY
	( -- flag )

如果一個字元被提供, 回傳真. 否則, 回傳假. 如果在第一個正確的字元前提供非字元鍵盤事件被提供, 它們將會被丟棄, 而後來不提供. 這個字元必須被下一個 KEY 的執行來傳回.

在 KEY? 傳回一個真之後, 以後的在 KEY 或 EKEY 執行之前的 KEY? 也回傳真, 而不丟棄鍵盤事件.

參閱: A.10.6.1.1755 KEY?


10.6.1.1755 KEY?
key-question FACILITY
	( -- flag )

If a character is available, return true. Otherwise, return false. If non-character keyboard events are available before the first valid character, they are discarded and are subsequently unavailable. The character shall be returned by the next execution of KEY.

After KEY? returns with a value of true, subsequent executions of KEY? prior to the execution of KEY or EKEY also return true, without discarding keyboard events.

See: A.10.6.1.1755 KEY?


10.6.1.2005 PAGE
FACILITY
	( -- )

移到另一頁來輸出. 實際的功能依據輸出裝置. 在一個終端機, PAGE 清除螢幕並重設游標到左上角. 在一個印表機上, PAGE 進行一個格式提示(譯註: 換頁符號).


10.6.1.2005 PAGE
FACILITY
	( -- )

Move to another page for output. Actual function depends on the output device. On a terminal, PAGE clears the screen and resets the cursor position to the upper left corner. On a printer, PAGE performs a form feed.


10.6.2 設備延伸詞(Facility extension words)


10.6.2.1305 EKEY
e-key FACILITY EXT
	( -- u )

接收一個鍵盤事件 u. 鍵盤事件的編碼是實作自訂的.

參閱: 10.6.1.1755 KEY? , 6.1.1750 KEY , A.10.6.2.1305 EKEY


10.6.2.1305 EKEY
e-key FACILITY EXT
	( -- u )

Receive one keyboard event u. The encoding of keyboard events is implementation defined.

See: 10.6.1.1755 KEY? , 6.1.1750 KEY , A.10.6.2.1305 EKEY


10.6.2.1306 EKEY>CHAR
e-key-to-char FACILITY EXT
	( u -- u false | char true )

如果鍵盤事件 u 對應於一個在一個實作自訂字元集的一個字元, 回傳這個字元和真. 否則回傳 u 和否.

參閱: A.10.6.2.1306 EKEY>CHAR


10.6.2.1306 EKEY>CHAR
e-key-to-char FACILITY EXT
	( u -- u false | char true )

If the keyboard event u corresponds to a character in the implementation-defined character set, return that character and true. Otherwise return u and false.

See: A.10.6.2.1306 EKEY>CHAR


10.6.2.1307 EKEY?
e-key-問號 FACILITY EXT
	( -- flag )

如果一個鍵盤事件被提供, 回傳真. 否則回傳假. 這個事件必須被下一個 EKEY 的執行傳回.

在 EKEY? 回傳一個真值後, 在 KEY, KEY? 或 EKEY 執行之前伴隨發生的 EKEY? 執行也回傳真, 參考相同的事件.


10.6.2.1307 EKEY?
e-key-question FACILITY EXT
	( -- flag )

If a keyboard event is available, return true. Otherwise return false. The event shall be returned by the next execution of EKEY.

After EKEY? returns with a value of true, subsequent executions of EKEY? prior to the execution of KEY, KEY? or EKEY also return true, referring to the same event.


10.6.2.1325 EMIT?
emit-問號 FACILITY EXT
	( -- flag )

如果使用者輸出裝置準備接收資料而取代 EMIT? 執行的 EMIT 將不會 遭受一個無限的延遲, flag 為真. 如果裝置狀態是未決定的, flag 為真.

參閱: A.10.6.2.1325 EMIT?


10.6.2.1325 EMIT?
emit-question FACILITY EXT
	( -- flag )

flag is true if the user output device is ready to accept data and the execution of EMIT in place of EMIT? would not have suffered an indefinite delay. If the device status is indeterminate, flag is true.

See: A.10.6.2.1325 EMIT?


10.6.2.1905 MS
FACILITY EXT
	( u -- )

等待至少 u 千分之一秒.

注意: 實際的長度和時間週期的變化依據實作自訂的系統時鐘精確度、 其他系統和電腦的特質, 這在這個標準的範圍之外.

參閱: A.10.6.2.1905 MS


10.6.2.1905 MS
FACILITY EXT
	( u -- )

Wait at least u milliseconds.

Note: The actual length and variability of the time period depends upon the implementation-defined resolution of the system clock and upon other system and computer characteristics beyond the scope of this Standard.

See: A.10.6.2.1905 MS


10.6.2.2292 TIME&DATE
時間-和-日期 FACILITY EXT
	( -- +n1 +n2 +n3 +n4 +n5 +n6 )

回傳目前的時間和日期. +n1 是秒數 {0...59}, +n2 是分鐘 {0...59}, +n3 是小時 {0...23}, +n4 是日期 {1...31}, +n5 是月份 {1...12}, 而 +n6 是年 (例如, 1991).

參閱: A.10.6.2.2292 TIME&DATE


10.6.2.2292 TIME&DATE
time-and-date FACILITY EXT
	( -- +n1 +n2 +n3 +n4 +n5 +n6 )

Return the current time and date. +n1 is the second {0...59}, +n2 is the minute {0...59}, +n3 is the hour {0...23}, +n4 is the day {1...31} +n5 is the month {1...12}, and +n6 is the year (e.g., 1991).

See: A.10.6.2.2292 TIME&DATE


內容列表(Table of Contents)
下一章(Next Section)