- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello all,
A post-processing code I am updating was written for Open Watcom 1.1 and makes use of the fnextrecl function to process an unformatted, sequential file. The function (I'm guessing) reads the first 4 bytes of the file to determine the record length and then some decision work is performed based on that length.
I am looking for a way to do the same thing in CVF 6.6c: determine the length of the next record and read the record based upon the returned length. A two step work around is fine, too (e.g., read and store the length of each record, rewind, and process).
thanks in advance
tlillys
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The way I would handle this is to open the file FORM="BINARY" and read the length words directly as an integer. There is a 32-bit integer length preceding and following the data. See the Programmer's Guide for details on the layout.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page