Re: Data table text I/O package?
- From: Georg Bauhaus <bauhaus@xxxxxxxxxxxxx>
- Date: Mon, 20 Jun 2005 20:25:13 +0200
Dmitry A. Kazakov wrote:
On Mon, 20 Jun 2005 13:19:44 +0200, Georg Bauhaus wrote:
Dmitry A. Kazakov wrote:
Get (Line, Pointer, Field_2); -- Get field and move Pointer ... etc
Quite trivial.
And quite adventurous in any but an internal context.
If you are parsing data from outside, you have to know the quality and structure of data (plus the pitfalls mentioned by Robert Duff.) As to quality, just one inadvertently typed space might be hazardous when it splits an atom in two... :)
(Think of a medium quality CSV file, and a number typed 3.1 5. Oops!)
XML can help with this for example by identifying the bounds of a data item, even if mistyped: <Distance km='3.1 5'/> This will be noticed by the XML parser if it knows about km's type (NMTOKEN). You could as well squeeze the space out using either Ada.Strings or XML related technology. But in any case there can be no doubt that the string "3.1 5" is a mistyped number.
Georg .
- Follow-Ups:
- Re: Data table text I/O package?
- From: Dmitry A. Kazakov
- Re: Data table text I/O package?
- From: Preben Randhol
- Re: Data table text I/O package?
- References:
- Data table text I/O package?
- From: Jacob Sparre Andersen
- Re: Data table text I/O package?
- From: Preben Randhol
- Re: Data table text I/O package?
- From: Jacob Sparre Andersen
- Re: Data table text I/O package?
- From: Preben Randhol
- Re: Data table text I/O package?
- From: Jacob Sparre Andersen
- Re: Data table text I/O package?
- From: Randy Brukardt
- Re: Data table text I/O package?
- From: Jacob Sparre Andersen
- Re: Data table text I/O package?
- From: Marius Amado Alves
- Re: Data table text I/O package?
- From: Georg Bauhaus
- Re: Data table text I/O package?
- From: Dmitry A. Kazakov
- Re: Data table text I/O package?
- From: Georg Bauhaus
- Re: Data table text I/O package?
- From: Dmitry A. Kazakov
- Re: Data table text I/O package?
- From: Georg Bauhaus
- Re: Data table text I/O package?
- From: Dmitry A. Kazakov
- Data table text I/O package?
- Prev by Date: Re: Aliased
- Next by Date: Re: Data table text I/O package?
- Previous by thread: Re: Data table text I/O package?
- Next by thread: Re: Data table text I/O package?
- Index(es):
Relevant Pages
|