- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm having a problem with 3rd party data. It's written unformatted, with big endian. All our programs work on a little endian OS.
We're trying to write a module that can read in the big endian data, do some changes and write the output to disk in little endian.
When compiling we have to use the "-convert big-endian" option to read the input, but don't need it, to write the output.
Is there any trick that can solve this problem ?
Many thanks in advance
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Current ifort provides options to apply big-endian conversion to one file and not to another. There are both environment variable and OPEN keyword options, and more explanations in the doc files than could be repeated here. You would READ from the unit where you have set big-endian, and WRITE to a unit which is not so set. I would call this a trick only in the sense that it relies on compiler vendor-dependent facilities.

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