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 #13639 is a reply to message #13638] Fri, 20 November 1998 00:00 Go to previous messageGo to previous message
Brian Jackel is currently offline  Brian Jackel
Messages: 34
Registered: January 1998
Member
Not an obvious place to look, but from the docs:

========================================================
The N_TAGS function returns the number of structure
tags contained in a structure expression. It optionally
returns the size, in bytes, of the structure.
...
Keywords

LENGTH
Set this keyword to return the length of the structure, in bytes.

Note: The length of a structure is machine dependent.
The length of a given structure will vary depending
upon the host machine. IDL pads and aligns structures
in a manner consistent with the host machine's C compiler.
============================================================

I'm not sure if this works recursively (ie. structures in
structures). If not, and you need that, then drop me a
line. I've got some old code that does the general case,
but it's got some hardwired assumptions about how big
certain variable type are. Probably safe....


Hope this helps.

Brian Jackel
[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: Mon Dec 01 04:15:02 PST 2025

Total time taken to generate the page: 1.52241 seconds