- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is the general difference between a file openned as unformatted sequential and binary? The context of this question is that I have some code that writes a sequence of variables in one write statement to a file openned as unformatted sequential. Subsequently, I am trying to read the same file in some Visual Basic code using Binary access. The VB code does not seem to read the data properly. Is this because unformatted sequential writes the list of variables as 1 record and Binary tries reading each variable as a separate record? If I write the data in FORTRAN code to a file openned using Binary then the VB program reads the data properly.
TIA
TIA
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unformatted sequential contains start-of-record and end-of-record markers; binary does not (i.e. it's hard to even imagine concept of "records" in binary). Programmer's Guide discusses that in detail.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks
I figured this out through some small test cases. It happens that the start and end markers are equal to the record length that FORTRAN writes when read as Binary in VB.
I figured this out through some small test cases. It happens that the start and end markers are equal to the record length that FORTRAN writes when read as Binary in VB.
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