comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Binary file created with IDL strings
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Binary file created with IDL strings [message #57319 is a reply to message #57276] Wed, 05 December 2007 09:12 Go to previous messageGo to previous message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Dec 5, 11:00 am, peajai.all.the....@gmail.com wrote:
> On Dec 5, 11:36 am, Vince Hradil <hrad...@yahoo.com> wrote:
>
>> On Dec 5, 10:32 am, peajai.all.the....@gmail.com wrote:
>
>>> I am trying to read in a IDL created binary file in C++. The file
>>> contains floats, ints, doubles, and strings. I am able to read the
>>> floats and ints (shorts in C++) with no problem, but once I get to the
>>> section of the file containing strings, I cannot seem to read in the
>>> correct number of bytes. I am not concerned with the contents on the
>>> strings, but there is more data in floats after the strings that I
>>> need to be able to read properly. If possible, I could seek forward
>>> however many bytes just to get to the location of the data after the
>>> strings. Does anyone know how many bytes each character in an IDL
>>> string is? There are 22 strings, each 20 characters long. How many
>>> bytes would this be?
>
>> Each character is a byte.
>
> Do I need to account for an extra byte at the end of each string for a
> null terminator?

I should have guessed you were going to ask that 8) I avoided it
because I'm not 100% sure, but I think IDL does NOT write the null
terminator like C. Pretty easy to test...
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL 7.0/Eclipse DE memory hogger
Next Topic: Re: question about paths/workspace

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 03:02:07 PDT 2025

Total time taken to generate the page: 0.95888 seconds