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

Home » Public Forums » archive » Re: Need prog to give size of a structure in bytes
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: Need prog to give size of a structure in bytes [message #13640 is a reply to message #13638] Fri, 20 November 1998 00:00 Go to previous messageGo to previous message
Joe Means is currently offline  Joe Means
Messages: 44
Registered: November 1996
Member
I like your idea, David, but the length= from help is not close to the size of the
file when it is written out in binary.
IDL> help, /struct, headout
** Structure SMALLFOOTHEADER, 7 tags, length=272:
VERSION STRING 'smallfootheader1 '
TOTSHOTCOUNT LONG 0
DATUM STRING '83'
DATATYPE STRING 'utm'
NUMFILES INT 1
SHOTCOUNTS LONG Array[20]
FILENAMES STRING Array[20]
While the size of the file when written and closed is 1496 bytes. The filename
strings are each 70 characters long. Any ideas on this?

--Joe

David Fanning wrote:

> Snip....
>
> Help, struct, /Structure, Output=structInfo
> stuffIWant = structInfo[0]
> lengthInBytes = ParseIt(stuffIWant)
>
> I'll leave the ParseIt routine as an exercise for the reader. ;-)
>
> Cheers,
>
> David
>
> P.S. RSI warns you that following the instructions above
> may lead to heartache. I echo their comments.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL 5.2 available for FTP
Next Topic: Re: INSIGHT 3D Visualization ?

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

Current Time: Sat Oct 11 08:57:17 PDT 2025

Total time taken to generate the page: 0.08065 seconds