Dec 092017
 
F-PC 3.5xx Forth tools. Tool 4 of 8. Streaming I/O for F-PC.
File STREAMIO.ZIP from The Programmer’s Corner in
Category Forth Source Code
F-PC 3.5xx Forth tools. Tool 4 of 8. Streaming I/O for F-PC.
File Name File Size Zip Size Zip Type
DOSFILE.TXT 4354 1632 deflated
DUMPFILE.TXT 312 212 deflated
LINKS.TXT 1815 643 deflated
LOADSTRM.TXT 2803 1295 deflated
README.1ST 2963 1330 deflated
STREAM.TXT 7862 2774 deflated
STREAMS.ANS 85356 11319 deflated
STRMDISK.TXT 4233 1404 deflated
TRYME.DOC 883 509 deflated

Download File STREAMIO.ZIP Here

Contents of the README.1ST file



N-Forth Stream I/O
Version 1.4

=======================================================================

Daniel Phillips and Informatics Research have made these stream I/O
routines available to the Forth language community to further the
growth of Forth as an Applications Language. You may use this code in
your application without license fee, providing you display this notice
on the startup screen and in the documentation:

N-Forth Stream I/O, Copyright 1982-1989
Daniel Phillips, Informatics Research Ltd.

=======================================================================

I would like to acknowledge the work of Robbie Spruit, who implemented
the DOS 2.0 version of the N-Forth DOS file access layer, and
Zafar Essak, who provided the adaptation to Tom Zimmer's F-PC.

Daniel Phillips, July 1989

What is Stream I/O?

Stream I/O is the natural result of looking at input and output as
entirely symmetric operations. Input is nothing more than the act of
reading a stream of characters, one after the other. Similarly, output
is the act of generating a stream of characters, one after the other.
All I/O is based on two primitive operations: read a character (the
"IN" function) and write a character (the "OUT" function).

User interaction and file I/O are both seen as forms of stream I/O
requiring only one set of basic operations. That being the case, a
program written to produce text output on the screen can easily send
its output to a file instead, and vice versa.

In the N-Forth stream model we look at streams as data objects. This
is a very powerful and at the same time, a very simple concept. A
complete set of operations is provided on objects of type stream
including creating, destroying, reading from, writing to, etc. The
exact representation of stream objects is tidily tucked away in classic
object oriented programming style.

N-Forth stream I/O has found its way into several full-scale commercial
products. These include VP-Planner (written in Kent Brother's K-Forth
which is based on N-Forth), the ECAD engineering drafting package
developed by Pelton Engineering (in N-Forth), EMMA - The Electronic
Medical Management Assistant developed by Zafar Essak (in F-PC), and
Project:VISION, my own project planning product (written in N-Forth).

The method has proved entirely satisfactory. No significant changes to
the model have been required from the day it was designed even with an
upgrade from DOS 1 file access functions to DOS 2. This suggests that
the design has fundamental strength.

The Stream I/O word set has been forwarded as a proposal to the
ANSI X3J14 Forth Standards Committee. The proposal includes a
discussion and some examples of use. The file STREAMS.ANS is the
proposal as sent to the committee.




 December 9, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)