From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9c292a0d123c3103 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-11-04 18:01:09 PST Path: bga.com!news.sprintlink.net!hookup!swrinde!news.dell.com!tadpole.com!uunet!comp.vuw.ac.nz!zephyr.grace.cri.nz!usenet From: srghsjm@grv.grace.cri.nz Newsgroups: comp.lang.ada Subject: RE: Need help on file parameter input Date: Sat, 5 Nov 94 02:01:09 GMT Organization: Industrial Research Ltd., New Zealand. Message-ID: <39epon$ihd@zephyr.grace.cri.nz> References: ,<39cdks$ndh@zephyr.grace.cri.nz> NNTP-Posting-Host: grv.grace.cri.nz Date: 1994-11-05T02:01:09+00:00 List-Id: 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 { [assignment] ; }. is any legal Ada identifier. The optional [assignment] can be any of "=", ":=", or "=>". Semicolon separators are required between assignments. The form of 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