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

Home » Public Forums » archive » HDF_VD_WRITE for string data
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
HDF_VD_WRITE for string data [message #62875] Tue, 14 October 2008 05:32 Go to previous message
Brian is currently offline  Brian
Messages: 27
Registered: March 2001
Junior Member
I'm attempting to add string data to VDATA. I've been mixing data
types using the HDF_PACKDATA function (float and long in example
below), but can't get the string type to work. Instead of "Test" I get
a 4 byte value.

Any suggestions?

------------------------------------------------------------ ------------------------------------------
PRO testvd

fid = HDF_OPEN('out.hdf', /CREATE)
Vdat = HDF_VD_ATTACH(fid, -1, /WRITE)
HDF_VD_SETINFO, Vdat, NAME='ancillary'
HDF_VD_FDEFINE, Vdat, 'VAR1', /FLOAT, ORDER=1
HDF_VD_FDEFINE, Vdat, 'VAR2', /LONG, ORDER=1
HDF_VD_FDEFINE, Vdat, 'VAR3', /BYTE, ORDER=4

v1 = 134.5
v2 = 30000L
v3 = 'Test'

odata = HDF_PACKDATA(v1,v2,v3,HDF_TYPE=[5,24,4],HDF_ORDER=[0,0,4])
HDF_VD_WRITE,Vdat,'VAR1, VAR2, VAR3',odata

HDF_VD_Detach,Vdat
HDF_CLOSE, fid

END
[Message index]
 
Read Message
Read Message
Previous Topic: Re: assign an octal number to a variable
Next Topic: Send object graphics hierarchy to POV-Ray destination class

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

Current Time: Sun Oct 12 00:43:54 PDT 2025

Total time taken to generate the page: 1.92023 seconds