comp.lang.ada
 help / color / mirror / Atom feed
From: jmoor@my-deja.com
Subject: Re: Extracting Fields in Files
Date: 2000/01/13
Date: 2000-01-13T00:00:00+00:00	[thread overview]
Message-ID: <85l0iu$6uj$1@nnrp1.deja.com> (raw)
In-Reply-To: 200001130658.HAA07055@bulgaria.otn.eurocopter.de

Would you believe that I am reading a variable length record created on
a Unisys machine whose records are in the following sequence:

record    size
  #       (bytes)

1          16
2         212
3          16
4         212
5          16
6         212
7          16
8         212
9          16

I open the file with the following statement;
  text_io_open ( file => tip0125,
       mode => text_i.in_file,
       name => "tip0125");

Every time I read the file with the following statement;
  get_line (file => tip0125,
      item => rec01,
      last => rec01_length,)

After each 212 byte record is read, the get_line goes through a cycle
where it believes a zero byte record has been read.  I can easily get
around the problem by testing "rec01_length" for zero bytes, but this
is evidence that I might not understand the nature of the "get_line"
command when reading a variable length file.


Sent via Deja.com http://www.deja.com/
Before you buy.




  reply	other threads:[~2000-01-13  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-13  0:00 Extracting Fields in Files Christoph Grein
2000-01-13  0:00 ` jmoor [this message]
2000-01-13  0:00   ` David C. Hoos, Sr.
2000-01-14  0:00     ` jmoor
2000-01-14  0:00       ` Ted Dennison
2000-01-15  0:00       ` Gautier
  -- strict thread matches above, loose matches on Subject: below --
2000-01-14  0:00 Christoph Grein
2000-01-14  0:00 ` jmoor
2000-01-12  0:00 jmoor
replies disabled

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