參閱: A.11
選用的檔案存取詞集(The optional File-Access word set)
These words provide access to mass storage in the form of files under the following assumptions:
Append table 11.1 to table 3.1.
表格 11.1 - 資料型別
符號 資料型別 在堆疊上的大小 ------ --------- ------------- ior 輸出入結果 1 cell fam 檔案存取方法 1 cell fileid 檔案識別號碼 1 cell
Table 11.1 - Data types
Symbol Data type Size on stack ------ --------- ------------- ior I/O results 1 cell fam file access method 1 cell fileid file identifiers 1 cell
File identifiers are implementation-dependent single-cell values that are passed to file operators to designate specific files. Opening a file assigns a file identifier, which remains valid until closed.
I/O results are single-cell numbers indicating the result of I/O operations. A value of zero indicates that the I/O operation completed successfully; other values and their meanings are implementation-defined. Reaching the end of a file shall be reported as zero.
一個在執行一個可以回傳輸出入結果的檔案存取詞時發生的輸出入例外必須不能導致一個 THROW; 例外指示是由 ior 傳回的.
An I/O exception in the execution of a File-Access word that can return an I/O result shall not cause a THROW; exception indications are returned in the ior.
File access methods are implementation-defined single-cell values.
A character string containing the name of the file. The file name may include an implementation-dependent path name. The format of file names is implementation defined.
If the File-Access word set is implemented, the Block word set shall be implemented.
區塊可以, 但不必, 存在於檔案中. 當它們存在時:
Blocks may, but need not, reside in files. When they do:
參閱(See): A.11.3.2
在檔案中的區塊(Blocks in files)
Append table 11.2 to table 3.5.
參閱(See): 3.2.6
環境的詢問(Environmental queries)
表格 11.2 - 環境詢問字串
字串 值 資料型別 常數? 意義 ------ --------------- --------- ------- FILE flag no 檔案詞集存在 FILE-EXT flag no 檔案延伸詞集存在
Table 11.2 - Environmental query strings
String Value data type Constant? Meaning ------ --------------- --------- ------- FILE flag no file word set present FILE-EXT flag no file extensions word set present
The File-Access word set creates another input source for the text interpreter. When the input source is a text file, BLK shall contain zero, SOURCE-ID shall contain the fileid of that text file, and the input buffer shall contain one line of the text file.
用 INCLUDED, INCLUDE-FILE, LOAD 和 EVALUATE 的輸入必須被以任何順序巢狀至少八層.
Input with INCLUDED, INCLUDE-FILE, LOAD and EVALUATE shall be nestable in any order to at least eight levels.
一個用超過八層的輸入檔案巢狀的程式有環境相依性.
A program that uses more than eight levels of input-file nesting has an environmental dependency.
參閱(See): 3.3.3.5
輸入緩衝區(Input buffers), 9.
選用的例外詞集(Optional Exception word set).
The list of words using memory in transient regions is extended to include 11.6.1.2165 S".
參閱(See): 3.3.3.6
其他暫時的區域(Other transient regions)
When parsing from a text file using a space delimiter, control characters shall be treated the same as the space character.
至少 128 個字元的行必須被支援. 一個需要一行超過 128 個字元的程式有環境相依性.
Lines of at least 128 characters shall be supported. A program that requires lines of more than 128 characters has an environmental dependency.
一個程式可以用調整 >IN 的內容來重定位在輸入緩衝區中的分析區. 更大量的重定位可以用 SAVE-INPUT 和 RESTORE-INPUT 來完成.
A program may reposition the parse area within the input buffer by manipulating the contents of >IN. More extensive repositioning can be accomplished using SAVE-INPUT and RESTORE-INPUT.
參閱(See): 3.4.1
分析(Parsing)
The phrase Providing the File Access word set shall be appended to the label of any Standard System that provides all of the File Access word set.
措辭 從檔案存取延伸詞集提供 name(s) 必須被加到任何提供部分檔案存取延伸詞集的標準系統的描述之中.
The phrase Providing name(s) from the File Access Extensions word set shall be appended to the label of any Standard System that provides portions of the File Access Extensions word set.
措辭 提供檔案存取延伸詞集 必須被加到任何提供所有檔案存取詞集和檔案存取延伸詞集的標準系統的描述之中.
The phrase Providing the File Access Extensions word set shall be appended to the label of any Standard System that provides all of the File Access and File Access Extensions word sets.
The phrase Requiring the File Access word set shall be appended to the label of Standard Programs that require the system to provide the File Access word set.
措辭 需要檔案存取延伸詞集中的 name(s) 必須被加到任何需要系統提供部分檔案存取延伸詞集的標準程式的描述之中.
The phrase Requiring name(s) from the File Access Extensions word set shall be appended to the label of Standard Programs that require the system to provide portions of the File Access Extensions word set.
措辭 需要檔案存取延伸詞集 必須被加到任何需要系統提供所有檔案存取和檔案存取延伸詞集的標準程式的描述之中.
The phrase Requiring the File Access Extensions word set shall be appended to the label of Standard Programs that require the system to provide all of the File Access and File Access Extensions word sets.
11.6.1.0080 ( ( "ccc<paren>" -- )
延伸 6.1.0080 ( 的語義來包含:
在從一個文字檔案分析時, 如果在找到右括弧之前先到達分析區的結尾時, 從這一個檔案的下一行重填滿輸入緩衝區, 設定 >IN 為零, 並且再繼續分析, 重複這個程序直到找到一個右括弧或達到這個檔案的結束.
11.6.1.0080 ( ( "ccc<paren>" -- )
Extend the semantics of 6.1.0080 ( to include:
When parsing from a text file, if the end of the parse area is reached before a right parenthesis is found, refill the input buffer from the next line of the file, set >IN to zero, and resume parsing, repeating this process until either a right parenthesis is found or the end of the file is reached.
11.6.1.0765 BIN ( fam1 -- fam2 )
修改實作自訂的檔案存取方法 fam1 成附加選擇一個 二進位 的存取方法 fam2, 換句話說, 不是以行導向的檔案存取方法.
參閱: A.11.6.1.0765
BIN , 11.6.1.2054
R/O , 11.6.1.2056
R/W , 11.6.1.2425
W/O
11.6.1.0765 BIN ( fam1 -- fam2 )
Modify the implementation-defined file access method fam1 to additionally select a binary, i.e., not line oriented, file access method, giving access method fam2.
See: A.11.6.1.0765
BIN , 11.6.1.2054
R/O , 11.6.1.2056
R/W , 11.6.1.2425
W/O
11.6.1.0900 CLOSE-FILE ( fileid -- ior )
關閉由 fileid 識別的檔案. ior 是實作自訂的輸出入結果碼.
11.6.1.0900 CLOSE-FILE ( fileid -- ior )
Close the file identified by fileid. ior is the implementation-defined I/O result code.
11.6.1.1010 CREATE-FILE ( c-addr u fam -- fileid ior )
由 c-addr 和 u 指定的字元字串為名稱創造檔案, 並且以檔案存取方法 fam 打開它. fam 的意義值是實作自訂的. 如果一個有相同檔名的檔案已經存在了, 重新將它創造成一個空白的檔案.
如果這個檔案被成功地創造和打開了, ior 是零, fileid 是它的識別符號, 而這個檔案會被定位在這檔案的開頭.
否則 ior 是實作自訂的輸出入結果代碼, fileid 是未定義的.
11.6.1.1010 CREATE-FILE ( c-addr u fam -- fileid ior )
Create the file named in the character string specified by c-addr and u, and open it with file access method fam. The meaning of values of fam is implementation defined. If a file with the same name already exists, recreate it as an empty file.
If the file was successfully created and opened, ior is zero, fileid is its identifier, and the file has been positioned to the start of the file.
Otherwise, ior is the implementation-defined I/O result code and fileid is undefined.
See: A.11.6.1.1010
CREATE-FILE
11.6.1.1190 DELETE-FILE ( c-addr u -- ior )
由 c-addr 和 u 指定的字元字串為名稱刪除檔案. ior 是實作自訂的輸出入結果代碼.
11.6.1.1190 DELETE-FILE ( c-addr u -- ior )
Delete the file named in the character string specified by c-addr u. ior is the implementation-defined I/O result code.
11.6.1.1520 FILE-POSITION ( fileid -- ud ior )
ud 是由 fileid 識別的檔案的目前檔案位置. ior 是實作自訂的輸出入結果代碼. 如果 ior 非零時, ud 是未定義的.
11.6.1.1520 FILE-POSITION ( fileid -- ud ior )
ud is the current file position for the file identified by fileid. ior is the implementation-defined I/O result code. ud is undefined if ior is non-zero.
11.6.1.1522 FILE-SIZE ( fileid -- ud ior )
ud 是由 fileid 識別的檔案以字元為單位的大小. ior 是實作自訂的輸出入結果代碼. 這項操作不影響由 FILE-POSITION 傳回之值. 如果 ior 非零時, ud 是未定義的.
11.6.1.1522 FILE-SIZE ( fileid -- ud ior )
ud is the size, in characters, of the file identified by fileid. ior is the implementation-defined I/O result code. This operation does not affect the value returned by FILE-POSITION. ud is undefined if ior is non-zero.
11.6.1.1717 INCLUDE-FILE ( i*x fileid -- j*x )
從堆疊上移除 fileid. 將目前的輸入來源規格儲存起來, 包含目前 SOURCE-ID 的值. 將 fileid 存入 SOURCE-ID. 將由 fileid 指定的檔案變成輸入來源. 將零存入 BLK 中. 其他堆疊影響依據包含進來的詞而訂.
重複直到檔案結束: 從檔案讀取一行, 從那一行的內容填滿輸入緩衝區, 設定 >IN 為零, 並且解譯.
文字解譯開始在下一個檔案讀取將出現的檔案位置.
當到達這個檔案的結束時, 關閉這個檔案並回存輸入檔案規格到它被儲存之值.
如果 fileid 是不正確時(在從 fileid 讀取時或在關閉 fileid 時發生輸出入例外), 將會發生模稜兩可的情況. 當模稜兩可的情況發生時, 正在被解譯的任何檔案的狀態(開啟或關閉)是實作自訂的.
參閱: 11.3.4
輸入來源, A.11.6.1.1717
INCLUDE-FILE
11.6.1.1717 INCLUDE-FILE ( i*x fileid -- j*x )
Remove fileid from the stack. Save the current input source specification, including the current value of SOURCE-ID. Store fileid in SOURCE-ID. Make the file specified by fileid the input source. Store zero in BLK. Other stack effects are due to the words included.
Repeat until end of file: read a line from the file, fill the input buffer from the contents of that line, set >IN to zero, and interpret.
Text interpretation begins at the file position where the next file read would occur.
When the end of the file is reached, close the file and restore the input source specification to its saved value.
An ambiguous condition exists if fileid is invalid, if there is an I/O exception reading fileid, or if an I/O exception occurs while closing fileid. When an ambiguous condition exists, the status (open or closed) of any files that were being interpreted is implementation-defined.
See: 11.3.4
Input source, A.11.6.1.1717
INCLUDE-FILE
11.6.1.1718 INCLUDED ( i*x c-addr u -- j*x )
從堆疊上移除 fileid. 將目前的輸入來源規格儲存起來, 包含目前 SOURCE-ID 的值. 將由 c-addr u 指定的檔案開啟, 儲存結果的 fileid 至 SOURCE-ID, 並且讓它成為輸入來源. 將零存入 BLK. 其他堆疊影響依據包含進來的詞而訂.
重複直到檔案結束: 從檔案讀取一行, 從那一行的內容填滿輸入緩衝區, 設定 >IN 為零, 並且解譯.
文字解譯開始在下一個檔案讀取將出現的檔案位置.
當到達這個檔案的結束時, 關閉這個檔案並回存輸入檔案規格到它被儲存之值.
如果 fileid 是不正確時(在從 fileid 讀取時或在關閉 fileid 時發生輸出入例外), 將會發生模稜兩可的情況. 當模稜兩可的情況發生時, 正在被解譯的任何檔案的狀態(開啟或關閉)是實作自訂的.
參閱: A.11.6.1.1718
INCLUDED , 11.6.1.1717
INCLUDE-FILE
11.6.1.1718 INCLUDED ( i*x c-addr u -- j*x )
Remove c-addr u from the stack. Save the current input source specification, including the current value of SOURCE-ID. Open the file specified by c-addr u, store the resulting fileid in SOURCE-ID, and make it the input source. Store zero in BLK. Other stack effects are due to the words included.
Repeat until end of file: read a line from the file, fill the input buffer from the contents of that line, set >IN to zero, and interpret.
Text interpretation begins at the file position where the next file read would occur.
When the end of the file is reached, close the file and restore the input source specification to its saved value.
An ambiguous condition exists if the named file can not be opened, if an I/O exception occurs reading the file, or if an I/O exception occurs while closing the file. When an ambiguous condition exists, the status (open or closed) of any files that were being interpreted is implementation-defined.
See: A.11.6.1.1718
INCLUDED , 11.6.1.1717
INCLUDE-FILE
11.6.1.1970 OPEN-FILE ( c-addr u fam -- fileid ior )
以 fam 提示的檔案存取方法開啟由 c-addr u 指定的字元字串為名稱的檔案. fam 值的意義是實作自訂的.
如果檔案被成功地開啟, ior 是零, fileid 是它的識別符號, 而這個檔案會被定位在這檔案的開頭.
否則 ior 是實作自訂的輸出入結果代碼, fileid 是未定義的.
11.6.1.1970 OPEN-FILE ( c-addr u fam -- fileid ior )
Open the file named in the character string specified by c-addr u, with file access method indicated by fam. The meaning of values of fam is implementation defined.
If the file is successfully opened, ior is zero, fileid is its identifier, and the file has been positioned to the start of the file.
Otherwise, ior is the implementation-defined I/O result code and fileid is undefined.
11.6.1.2054 R/O ( -- fam )
fam 是實作自訂之值, 為了選擇 唯讀 檔案存取方法.
參閱: 11.6.1.1010
CREATE-FILE , 11.6.1.1970
OPEN-FILE
11.6.1.2054 R/O ( -- fam )
fam is the implementation-defined value for selecting the read only file access method.
See: 11.6.1.1010
CREATE-FILE , 11.6.1.1970
OPEN-FILE
11.6.1.2056 R/W ( -- fam )
fam 是實作自訂之值, 為了選擇 讀/寫 檔案存取方法.
參閱: 11.6.1.1010
CREATE-FILE , 11.6.1.1970
OPEN-FILE
11.6.1.2056 R/W ( -- fam )
fam is the implementation-defined value for selecting the read/write file access method.
See: 11.6.1.1010
CREATE-FILE , 11.6.1.1970
OPEN-FILE
11.6.1.2080 READ-FILE ( c-addr u1 fileid -- u2 ior )
從 fileid 識別的檔案的目前位置讀取連續 u1 個字元到 c-addr.
如果 u1 在讀取時沒有發生一個例外, ior 是零, 而 u2 等於 u1.
如果在讀取 u1 個字元之前到達了檔案結束, ior 是零, 和 u2 是實際讀取的字元數目.
如果這項操作是開始於由 fileid 識別的檔案中的 FILE-POSITION 傳回之值等於 FILE-SIZE 傳回之值時, ior 是零且 u2 是零.
如果出現了一個例外, ior 是實作自訂的輸出入結果代碼, 且 u2 是在沒有例外前傳輸到 c-addr 的字元數目.
如果這項操作是開始於由 fileid 識別的檔案中的 FILE-POSITION 傳回之值大於 FILE-SIZE 傳回之值時, 或需求的操作嘗試去讀取這個檔案尚未寫入的部分時, 將會發生模稜兩可的情況.
在這項操作結束後, FILE-POSITION 傳回最後被讀取的字元的下一個檔案位置.
11.6.1.2080 READ-FILE ( c-addr u1 fileid -- u2 ior )
Read u1 consecutive characters to c-addr from the current position of the file identified by fileid.
If u1 characters are read without an exception, ior is zero and u2 is equal to u1.
If the end of the file is reached before u1 characters are read, ior is zero and u2 is the number of characters actually read.
If the operation is initiated when the value returned by FILE-POSITION is equal to the value returned by FILE-SIZE for the file identified by fileid, ior is zero and u2 is zero.
If an exception occurs, ior is the implementation-defined I/O result code, and u2 is the number of characters transferred to c-addr without an exception.
An ambiguous condition exists if the operation is initiated when the value returned by FILE-POSITION is greater than the value returned by FILE-SIZE for the file identified by fileid, or if the requested operation attempts to read portions of the file not written.
At the conclusion of the operation, FILE-POSITION returns the next file position after the last character read.
11.6.1.2090 READ-LINE ( c-addr u1 fileid -- u2 flag ior )
從由 fileid 指定的檔案讀取下一行到 c-addr 的記憶體位址. 最多 u1 個字元被讀取. 最多兩個實作自訂的行終端字元可以被讀入一行結束的記憶體, 但是不包含在 u2 計數中. 由 c-addr 提供的行緩衝區必須至少 u1 + 2 個字元的長度.
如果這項操作成功了, flag 是真且 ior 是零. 如果在 u1 個字元被讀取之前, 接收到了一個行終端符號, u2 是字元的數目, 並不包含行終端符號, 實際讀入 (0 <= u2 <= u1). 當 u1 = u2 時, 行終端符號尚未被讀到.
如果這項操作是開始於由 fileid 識別的檔案中的 FILE-POSITION 傳回之值等於 FILE-SIZE 傳回之值時, flag 是假, ior 是零且 u2 是零. 如果 ior 非零, 在這項操作過程中出現了一個例外, 且 ior 是實作自訂的輸出入結果代碼.
如果這項操作是開始於由 fileid 識別的檔案中的 FILE-POSITION 傳回之值大於 FILE-SIZE 傳回之值時, 或需求的操作嘗試去讀取這個檔案尚未寫入的部分時, 將會發生模稜兩可的情況.
在這項操作結束後, FILE-POSITION 傳回最後被讀取的字元的下一個檔案位置.
參閱: A.11.6.1.2090
READ-LINE , RFI
0001.
11.6.1.2090 READ-LINE ( c-addr u1 fileid -- u2 flag ior )
Read the next line from the file specified by fileid into memory at the address c-addr. At most u1 characters are read. Up to two implementation-defined line-terminating characters may be read into memory at the end of the line, but are not included in the count u2. The line buffer provided by c-addr should be at least u1+2 characters long.
If the operation succeeded, flag is true and ior is zero. If a line terminator was received before u1 characters were read, then u2 is the number of characters, not including the line terminator, actually read (0 <= u2 <= u1). When u1 = u2, the line terminator has yet to be reached.
If the operation is initiated when the value returned by FILE-POSITION is equal to the value returned by FILE-SIZE for the file identified by fileid, flag is false, ior is zero, and u2 is zero. If ior is non-zero, an exception occurred during the operation and ior is the implementation-defined I/O result code.
An ambiguous condition exists if the operation is initiated when the value returned by FILE-POSITION is greater than the value returned by FILE-SIZE for the file identified by fileid, or if the requested operation attempts to read portions of the file not written.
At the conclusion of the operation, FILE-POSITION returns the next file position after the last character read.
See: A.11.6.1.2090
READ-LINE , RFI
0001.
11.6.1.2142 REPOSITION-FILE ( ud fileid -- ior )
重定位由 fileid 識別的檔案至 ud 位置. ior 是實作自訂的輸出入結果代碼. 如果檔案要定位於檔案的邊界之外時, 將會發生模稜兩可的情況.
在這項操作結束後, FILE-POSITION 回傳之值為 ud.
11.6.1.2142 REPOSITION-FILE ( ud fileid -- ior )
Reposition the file identified by fileid to ud. ior is the implementation-defined I/O result code. An ambiguous condition exists if the file is positioned outside the file boundaries.
At the conclusion of the operation, FILE-POSITION returns the value ud.
11.6.1.2147 RESIZE-FILE ( ud fileid -- ior )
設定由 fileid 識別的檔案的大小為 ud. ior 是實作自訂的輸出入結果代碼.
如果結果的檔案大於操作之前的檔案, 被這項操作結果加入的檔案部分可以不必被寫入.
在這項操作結束後, FILE-SIZE 回傳值 ud, 而 FILE-POSITION 回傳一個未指定的值.
參閱: 11.6.1.2080
READ-FILE , 11.6.1.2090
READ-LINE
11.6.1.2147 RESIZE-FILE ( ud fileid -- ior )
Set the size of the file identified by fileid to ud. ior is the implementation-defined I/O result code.
If the resultant file is larger than the file before the operation, the portion of the file added as a result of the operation might not have been written.
At the conclusion of the operation, FILE-SIZE returns the value ud and FILE-POSITION returns an unspecified value.
See: 11.6.1.2080
READ-FILE , 11.6.1.2090
READ-LINE
11.6.1.2165 S" 延伸 6.1.2165 S" 的語義成:
解譯: ( "ccc<quote>" -- c-addr u )
分析由 " (雙引號) 分界的 ccc. 將結果的字串 c-addr u 儲存於一個暫時的位置. 這個暫時的緩衝區的最大長度是實作相依的, 但是必須不小於 80 字元. 接著使用的 S" 操作可以覆寫在這個暫時的緩衝區. 至少必須提供一個這種緩衝區.
編譯: ( "ccc<quote>" -- )
分析由 " (雙引號) 分界的 ccc. 將下列給予的執行語義加入目前的定義.
執行時期: ( -- c-addr u )
傳回由 c-addr 和 u 描述的、包含字元 ccc 的一個字串.
參閱: 3.4.1 分析, 6.2.0855
C" , A.11.6.1.2165
S" , 11.3.5
其他暫時的區域.
11.6.1.2165 S" Extend the semantics of 6.1.2165 S" to be:
Interpretation: ( "ccc<quote>" -- c-addr u )
Parse ccc delimited by " (double quote). Store the resulting string c-addr u at a temporary location. The maximum length of the temporary buffer is implementation-dependent but shall be no less than 80 characters. Subsequent uses of S" may overwrite the temporary buffer. At least one such buffer shall be provided.
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 that describe a string consisting of the characters ccc.
See: 3.4.1
Parsing, 6.2.0855
C" , A.11.6.1.2165
S" , 11.3.5
Other transient regions.
11.6.1.2218 SOURCE-ID
( -- 0 | -1 | fileid )
延伸 6.2.2218 SOURCE-ID 成包含文字檔案輸入的如下型式:
SOURCE-ID 輸入來源 --------- ------------ fileid 文字檔案 fileid -1 字串 (透過 EVALUATE) 0 使用者輸入裝置
當 BLK 包含一個非零值時, 使用 SOURCE-ID 將會產生一個模稜兩可的情況.
11.6.1.2218 SOURCE-ID
( -- 0 | -1 | fileid )
Extend 6.2.2218 SOURCE-ID to include text-file input as follows:
SOURCE-ID Input source --------- ------------ fileid Text file fileid -1 String (via EVALUATE) 0 User input device
An ambiguous condition exists if SOURCE-ID is used when BLK contains a non-zero value.
11.6.1.2425 W/O ( -- fam )
fam 是實作自訂之值, 為了選擇 唯寫 檔案存取方法.
參閱: 11.6.1.1010
CREATE-FILE , 11.6.1.1970
OPEN-FILE
11.6.1.2425 W/O ( -- fam )
fam is the implementation-defined value for selecting the write only file access method.
See: 11.6.1.1010
CREATE-FILE , 11.6.1.1970
OPEN-FILE
11.6.1.2480 WRITE-FILE ( c-addr u fileid -- ior )
從 c-addr 寫入 u 個字元到由 fileid 識別的檔案的目前位置. ior 是實作自訂的輸出入結果代碼.
在這項操作結束後, FILE-POSITION 傳回最後被寫入的字元的下一個檔案位置, 而 FILE-SIZE 的傳回值大於或等於 FILE-POSITION 傳回值.
參閱: 11.6.1.2080
READ-FILE , 11.6.1.2090
READ-LINE
11.6.1.2480 WRITE-FILE ( c-addr u fileid -- ior )
Write u characters from c-addr to the file identified by fileid starting at its current position. ior is the implementation-defined I/O result code.
At the conclusion of the operation, FILE-POSITION returns the next file position after the last character written to the file, and FILE-SIZE returns a value greater than or equal to the value returned by FILE-POSITION.
See: 11.6.1.2080
READ-FILE , 11.6.1.2090
READ-LINE
11.6.1.2485 WRITE-LINE ( c-addr u fileid -- ior )
從 c-addr 寫入 u 個字元到由 fileid 識別的檔案的目前位置, 跟隨著實作相依的行終端符號. ior 是實作自訂的輸出入結果代碼.
在這項操作結束後, FILE-POSITION 傳回最後被寫入的字元的下一個檔案位置, 而 FILE-SIZE 的傳回值大於或等於 FILE-POSITION 傳回值.
參閱: 11.6.1.2080
READ-FILE , 11.6.1.2090
READ-LINE
11.6.1.2485 WRITE-LINE ( c-addr u fileid -- ior )
Write u characters from c-addr followed by the implementation-dependent line terminator to the file identified by fileid starting at its current position. ior is the implementation-defined I/O result code.
At the conclusion of the operation, FILE-POSITION returns the next file position after the last character written to the file, and FILE-SIZE returns a value greater than or equal to the value returned by FILE-POSITION.
See: 11.6.1.2080
READ-FILE , 11.6.1.2090
READ-LINE
11.6.2.1524 FILE-STATUS ( c-addr u -- x ior )
傳回由字元字串 c-addr u 識別的檔案的狀態. 如果這個檔案存在, ior 是零; 否則 ior 是實作自訂的輸出入結果代碼. x 包含實作自訂的有關這個檔案的訊息.
11.6.2.1524 FILE-STATUS ( c-addr u -- x ior )
Return the status of the file identified by the character string c-addr u. If the file exists, ior is zero; otherwise ior is the implementation-defined I/O result code. x contains implementation-defined information about the file.
11.6.2.1560 FLUSH-FILE ( fileid -- ior )
嘗試去強迫任何延緩寫入、由 fileid 參考的檔案寫入到大量儲存媒體, 而且如果檔案大小有改變的話, 就寫入到儲存媒體的目錄中. 如果這項操作成功了, ior 是零. 否則它就是實作自訂的輸出入結果代碼.
11.6.2.1560 FLUSH-FILE ( fileid -- ior )
Attempt to force any buffered information written to the file referred to by fileid to be written to mass storage, and the size information for the file to be recorded in the storage directory if changed. If the operation is successful, ior is zero. Otherwise, it is an implementation-defined I/O result code.
11.6.2.2125 REFILL ( -- flag )
延伸 6.2.2125 REFILL 的執行語義加上:
當輸入來源是一個文字檔時, 嘗試去從這個文字輸入檔案讀取下一行. 如果成功了, 讓結果成為目前的輸入緩衝區, 設定 >IN 為零, 並且回傳真. 否則回傳假.
11.6.2.2125 REFILL ( -- flag )
Extend the execution semantics of 6.2.2125 REFILL with the following:
When the input source is a text file, attempt to read the next line from the text-input file. If successful, make the result the current input buffer, set >IN to zero, and return true. Otherwise return false.
See: 7.6.2.2125
REFILL
11.6.2.2130 RENAME-FILE ( c-addr1 u1 c-addr2 u2 -- ior )
重新命令由字元字串 c-addr1 u1 的檔案名字成為字元字串 c-addr2 u2. ior 是實作自訂的輸出入結果代碼.
11.6.2.2130 RENAME-FILE ( c-addr1 u1 c-addr2 u2 -- ior )
Rename the file named by the character string c-addr1 u1 to the name in the character string c-addr2 u2. ior is the implementation-defined I/O result code.
內容列表(Table of Contents)
下一章(Next Section)