comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: re: is there Ada package similar to Matlab textscan?
Date: Fri, 17 Jul 2015 04:25:44 +0000 (UTC)
Date: 2015-07-17T04:25:44+00:00	[thread overview]
Message-ID: <moa048$7mi$1@speranza.aioe.org> (raw)
In-Reply-To: mo9u61$4da$1@speranza.aioe.org

That's a CSV file.  I'm sure there are lots of folks' implementations.
The important part of mine is:

  function Field_Name(Csv_File: Csv_Files;
                      Index   : Field_Counts) return String;
  -- raises Constraint_Error if Index not in 1 .. Header's Field_Count

  function Field_Index(Csv_File:   Csv_Files;
                       Name: String) return Field_Counts;
  -- Ignoring case, find first field whose prefix = Name
  -- returns zero if not found

  procedure Read_A_Record(Csv_File: in out Csv_Files);
  -- May End_Error.
  -- If a record has fewer fields than the header indicated, it's
  -- padded out with null strings.

  function Field_Content(Csv_File: Csv_Files;
                         Index   : Field_Counts) return String;
  -- Raises Use_Error if called before any Read_A_Record.


  reply	other threads:[~2015-07-17  4:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-17  3:52 is there Ada package similar to Matlab textscan? Nasser M. Abbasi
2015-07-17  4:25 ` tmoran [this message]
2015-07-17  6:31 ` Dmitry A. Kazakov
2015-07-17 11:05 ` Björn Lundin
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox