File fl-1.0/README

              THE PINE CREEK MODULA-3 LIBRARY

                      FieldList, v. 1.0

                      November 13, 1991

    Breaks text strings into fields, which can be processed as
    strings, characters, or numbers (integer and floating-point).
    Provides a quick and efficient way to parse input lines and allow
    free-form input of text and numbers.

The FieldList interface allows you to declare objects called field
lists. You can place a text string into a field list, or read a line
into it from a reader, and the text will be divided into whitespace-
separated fields.  The fields can then be processed in any order, as
text or numbers. You can use the same field list many times; each new
input line replaces the previous one.

INSTALLATION

The distribution consists of a single compressed tar file, fl-1.0.tar.Z.
To unpack the distribution, type

> uncompress -c fl-1.0.tar.Z | tar xvf - 

This will create a directory named fl-1.0 containing the two library
source files (FieldList.i3 and FieldList.m3), two sample programs
(Sum.m3 and Test.m3), this README file, a Makefile, and a 7-page
document in PostScript format (FieldList.ps).

Printed copies of the documentation are available if you cannot print
a PostScript file yourself. Send a self-addressed, stamped (1 oz.),
letter-sized envelope to:

    Pine Creek Software
    305 South Craig Street, Suite 300
    Pittsburgh, PA  15213
    USA
    Phone: +1 (412) 681-9811
    Email: modula3@bert.pinecreek.com


EXERCISES

To get familiar with FieldList, try these exercises.

1. Install and build the FieldList software. Print or otherwise obtain
a copy of the manual.

2. Try out the Sum and Test programs. Sum adds two numbers. Test accepts
a line and shows how it is broken into fields.

3. Modify the Sum program so that it accepts any list of numbers on one
line and returns their sum. Treat non-number fields as if they had the 
value 0.

4. Write a desk calculator program. It should accept lines of this form:

	<line> := <number>
	<line> := <line> <operator> <number>
	<operator> ::= * | / | + | -

Operators must be surrounded by whitespace, and operations should be
performed left-to-right. Your program should print the result computed
on each line.

