Digest #20 2017-08-16
BIN has led us astray at first in Gforth: We thought that the idea was to use BIN like the "b" modes in C's fopen, (and, more importantly, no "b" without BIN) but this led to problems in connection with FILE-POSITION, REPOSITION-FILE, and RESIZE-FILE. And because READ-LINE and WRITE-LINE can make the program completely agnostic about the line terminator, our eventual conclusion was that we open all files in binary code, and deal with CRLF in our implementation of READ-LINE and WRITE-LINE instead of letting the C library translate it into an LF. This has been in use for about 20 years with no complaints.
Alex - good catch. Since the rationale mentions using wordlists, it would be sensible for the case sensitivity of the key names to be that of the system dictionary. All versions of Proforth and VFX have used wordlists (case-insensitive) for text macros since the late 1980s.
I suspect that we also ought to deal with case sensitivity in terms of the 7-bit ASCII that the standards use. The MPE dictionary tools only convert case for the range A-Z and a-z.