help message wrong for structures arrays
Status: Beta
Brought to you by:
m_schellens
GDL> toto=replicate(!D,32)
GDL> help,toto
** Structure !DEVICE, 17 tags, data length=272:
NAME STRING 'X'
X_SIZE LONG 640
Y_SIZE LONG 512
(etc)
IDL> toto=replicate(!D,32)
IDL> help,toto
TOTO STRUCT = -> !DEVICE Array[32]
IDL> help,toto,/str
** Structure !DEVICE, 17 tags, length=88, data length=88:
NAME STRING 'X'
X_SIZE LONG 640
Y_SIZE LONG 512
(etc)
272 indicates this GDL version is aligning entries on 16-byte boundaries.(17 * 16=272). Two of the tags are lonarr(2) so in
IDL the non-string storage = 14 * 4+16=72 and string is kept in
a 16-byte slot.
The "data length=" refers to what is allocated in GDL itself,
probably par->Sizeof() where par->NBytes() is conformant if NBytes is re-defined (post 0.9.5) to be the actual data occupancy rather than Sizeof(). This appears again in the /F77_unformatted mode of writeu and readu which is wrong in versions 0.x thru 0.9.5; when NBytes() is made to count the actual storage, it is corrected.
Last edit: GregJung 2015-03-20
moved to github: https://github.com/gnudatalanguage/gdl/issues/181