R/O, R/W and BIN work as you would
expect. W/O translates into the C file opening mode w (or
wb): The file is cleared, if it exists, and created, if it does
not (with both open-file and create-file). Under Unix
create-file creates a file with 666 permissions modified by your
umask.
The file words do not raise exceptions (except, perhaps, memory access faults when you pass illegal addresses or file-ids).
System-dependent. Gforth outputs LF on Unix (including WSL(2)) and CRLF on Windows (if anybody ever builds a Windows version again). Gforth accepts LF, CR and CRLF on input.
System dependent. Gforth just uses the file name format of your OS.
FILE-STATUS: ¶FILE-STATUS returns the most powerful file access mode allowed
for the file: Either R/O, W/O or R/W. If the file
cannot be accessed, R/O BIN is returned. BIN is applicable
along with the returned mode.
All files that are left via the exception are closed.
The iors returned by the file and memory allocation words are intended as throw codes. They typically are in the range -512−-2047 of OS errors. The mapping from OS error numbers to iors is -512−errno.
limited by the amount of return stack, locals/TIB stack, and the number of open files available. This should not give you troubles.
For file input, the maximum input line size is only limited by memory;
the buffer is expanded to read in as long lines as the file contains.
For terminal input, this auto-expansion does not happen, and the
current size of the input buffer is used; max#tib ? shows the
current input buffer size.
By default, blocks are accessed in the file blocks.fb in the
current working directory. The file can be switched with
open-blocks or use.
S": ¶The interpretation semantics S" allocates the memory for
the strings, so the number of string buffers is only limited by
memory.
S": ¶