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

Home » Public Forums » archive » Re: reading a ninary file
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: reading a ninary file [message #46868 is a reply to message #46867] Mon, 09 January 2006 02:12 Go to previous messageGo to previous message
peter.albert@gmx.de is currently offline  peter.albert@gmx.de
Messages: 108
Registered: July 2005
Senior Member
Hi,

you have to know *exactly* what it is the file before you start reading
it, i.e. the number and type of each and every variable within the
file. However, this seems to be the case as it looks as if you get the
long and fix variables well out of the file. As for the strings, I'd
suggest reading them as byte arrays and then converting them to string.
Mind, however, that you need to know the exact number of characters
within each string variable. Thus, it is not enough to know "there is a
string followed by a long number", but you need to know "there is a
string with 5 characters, followed by ..."

The IDL lines would then be

b = bytarr(5)
readu, lun, b
str_var = string(b)


Cheers,

Peter
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Strange Java bridge problem !!!
Next Topic: Re: mean() function

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

Current Time: Sun Oct 12 02:34:25 PDT 2025

Total time taken to generate the page: 1.36016 seconds