Home »
Public Forums »
archive »
sec : U Re: STRUCTURE SIZE
sec : U Re: STRUCTURE SIZE [message #29692] |
Sun, 10 March 2002 16:47 |
Andrew Cool
Messages: 219 Registered: January 1996
|
Senior Member |
|
|
lyubo wrote:
>
> How can I find the size of a structure (that contains other structures) in
> bytes?
>
> Lyubo
Hi,
David Fanning's site http://www.dfanning.com/tips/struct_length.html
says :-
QUESTION: How can I determine the size or length of an IDL structure
variable in bytes?
ANSWER: This functionality, oddly enough, is provided by the N_Tags
function and the Length keyword.
structSize = N_Tags(myStructure, /Length)
The length or size of a structure is machine dependent and depends
upon the host machine. IDL pads and aligns structures in a manner
consistent with the host machine's C compiler.
Andrew C.
------------------------------------------------------------ ---------
Andrew D. Cool .->-.
Electromagnetics & Propagation Group `-<-'
Surveillance Systems Division Transmitted on
Defence Science & Technology Organisation 100% recycled
PO Box 1500, Salisbury electrons
South Australia 5108
Phone : 061 8 8259 5740 Fax : 061 8 8259 6673
Email : andrew.cool@dsto.defence.gov.au
------------------------------------------------------------ ---------
|
|
|
Current Time: Wed Oct 08 17:34:08 PDT 2025
Total time taken to generate the page: 0.00571 seconds