comp.lang.ada
 help / color / mirror / Atom feed
From: woodruff@tanana.llnl.gov (John Woodruff)
Subject: Re: Ada code that is similar to FORTRAN's namelist?
Date: 1996/04/11
Date: 1996-04-11T00:00:00+00:00	[thread overview]
Message-ID: <WOODRUFF.96Apr10173618@tanana.llnl.gov> (raw)
In-Reply-To: 4kb9af$a93@news2.aero.org

>>>>> "gene" == Gene Lee <gene@saturn.aero.org> writes:

    > Has anyone written ada code that will read data from a file in a
    > manner similar to FORTRAN's namelist?

Yes.

I wrote such a package -- I call it Name_IO, and it is available on the
PAL library.  Take a look at 

languages/ada/swcomps/woodruff.zip:
  File Name                 Size
  ---------                 ----
  woodruff.zip            54,875

The file woodruff.zip contains the following files:
  readme.txt -- introduction
  support.src -- pager2 source of support routines from New Abstractions
              -- COMPILE THIS FIRST
  main.src    -- pager2 source of the Woodruff Collection
              -- COMPILE THIS SECOND
  testprog.src -- test program Test_Name_IO
  data.src     -- data file used by Test_Name_IO

The briefest possible summary is:

  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
  
Hope this is useful to you.

-- 
John Woodruff	                                          N I F   \ ^ /
Lawrence Livermore National Lab                         =====---- < 0 >
510 422 4661                                                      / v \




      reply	other threads:[~1996-04-11  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-08  0:00 Ada code that is similar to FORTRAN's namelist? Gene Lee
1996-04-11  0:00 ` John Woodruff [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