From: srghsjm@grv.grace.cri.nz
Subject: RE: Need help on file parameter input
Date: Sat, 5 Nov 94 02:01:09 GMT
Date: 1994-11-05T02:01:09+00:00 [thread overview]
Message-ID: <39epon$ihd@zephyr.grace.cri.nz> (raw)
In-Reply-To: 39cdks$ndh@zephyr.grace.cri.nz
In Article <39cdks$ndh@zephyr.grace.cri.nz>
srghsjm@grv.grace.cri.nz writes:
>Some time ago (that means, at least a year) sometime posted a package
>on comp.lang.ada for parsing data items from a separate file specified
>as variable objects, a bit like the following:
>
>A := 1.2345
>S := "A STRING"
>
>At the time I thought "I'll have to pick that up...", and didn't...
>Now I have a need for such a package...
>
>Does anyone remember this posting, or what it was called ?
>
>| Stephen McNeill
To follow up on my own question... I had mail from several people who managed
to point me in the right direction. The package I had remembered, but could
not remember a name for is the Woodruff collection. The package is located
in the PAL (where else !) and a heavily edited summary of the details is given
below. The bit I was interested in was the name_io package.
Many thanks to those who helped.
Stephen
+--------------------------------------------------------------------------+
| Stephen McNeill Phone : +64-4-569 0180 |
| Image Processing Team Direct : +64-4-569 0183 |
| Landcare Research New Zealand Ltd FAX : +64-4-569 0181 |
| Box 38-491 Internet: srghsjm@gih.grace.cri.nz |
| Wellington Mail Centre Omnet : s.mcneill |
| New Zealand Packet : zl4hg @ zl4hg.wlg.nzl.oc |
+--------------------------------------------------------------------------+
--------------------------------------------------------------------------------
------------------------------
1. Taxonomy:
SOFTWARE COMPONENTS
WOODRUFF COLLECTION
------------------------------
2. Author:
John P Woodruff
Lawrence Livermore National Laboratory
PO Box 808
Livermore CA 94550
(510) 422 4661
------------------------------
3. Rights:
Released to the Ada community; distribution unlimited
------------------------------
4. Abstract:
Woodruff Collection of Reusable Components for I/O in Ada
The complete list of items being submitted is
Set_Of
Input_Collection
Polite_IO
Matrix_IO
Name_IO
Test_Name_IO
1. Set_of
This is an implementation of the generic Set type, patterned after
the Pascal language Set type.
2. Input_Collection
Input Collection is a repository of user inputs that are to be
dispensed to individual Objects at the beginning of a simulation run.
The input is obtained from some file(s) and retained in this package
until called for by some object.
3. Polite_IO
Provide a polite, refined input organ for interactive data input.
The idea for this package comes from the package SafeIO in the Simtel20
repository, by J A Anderson of Texas Instruments.
4. Matrix_IO
Matrix_IO provides a full set of IO services based on text_io that
can read and write Vectors and Matrices. The interface entry names and
parameter signatures exactly duplicate the procedures in long_float_text_io.
5. Name_IO
Name_IO implements name-directed input in a generic package.
The package is able to deliver values bound to variables from an input
stream that looks like:
A = 1.0 ; a floating scalar
V := 3, 4, 5 ; a three-vector
Filename => "Test.dat;2" ; a string
Enum = Users_Enumerated_Constant ; Enumeration value
The format for the input to be parsed is a sequence of
{ <Ada_Id> [assignment] <Value> ; }.
<Ada_Id> is any legal Ada identifier.
The optional [assignment] can be any of "=", ":=", or "=>".
Semicolon separators are required between assignments.
The form of <Value> is determined by the type of
the variable, and is defined by Polite_IO.Float_Decode for floating
values, and by Matrix_IO.Get for vectors and matrices.
(The semicolon forms a terminator on a string that will be
parsed as a value, without placing any lexical requirement on
value, allowing the generic get_item to deliver an enumerated value.)
------------------------------
5. Directory Listing:
languages/ada/swcomps/woodruff.zip:
File Name Size
--------- ----
woodruff.zip 54,875
Totals
============== ==============
1 Files 54,875
prev parent reply other threads:[~1994-11-05 2:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-11-04 4:22 Need help on file parameter input srghsjm
1994-11-05 2:01 ` srghsjm [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox