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

Home » Public Forums » archive » structure length in files
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: structure length in files [message #84911 is a reply to message #84907] Tue, 18 June 2013 09:20 Go to previous messageGo to previous message
Bill Nel is currently offline  Bill Nel
Messages: 31
Registered: October 2010
Member
On Tuesday, June 18, 2013 11:20:10 AM UTC-4, Helder wrote:

> [Short summary: When IDL writes structures in unformatted binary data files, what size will the resulting file have, that described by n_tags(Example1,/LENGTH) or n_tags(Example1,/DATA_LENGTH)?]

I don't believe it is documented, but empirically (on my Windows 7 system -- and several years ago on a Unix system), writeu, struct writes the structure unpadded to a file, n_tags(struct, /data_length). You can check yourself using
openw, unit, filename, /get_lun,
writeu, unit, struct
point_lun, -unit, fileOffset

There is one important exception. If the struct contains strings, then n_tags(... , /data_length) isn't the size of the unpadded structure. (This is documented.)

--Wayne
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: A possible bug in IDL 8.2.3
Next Topic: Yet Another IDL 8.2.3 Anomoly with Window Refresh

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

Current Time: Wed Oct 08 13:34:38 PDT 2025

Total time taken to generate the page: 0.00421 seconds