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

Home » Public Forums » archive » Re: HDF_VD_WRITE for string data
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: HDF_VD_WRITE for string data [message #62871] Tue, 14 October 2008 06:13 Go to next message
Brian is currently offline  Brian
Messages: 27
Registered: March 2001
Junior Member
On Oct 14, 8:44 am, David Fanning <n...@dfanning.com> wrote:
> Brian writes:
>> 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.
>
> I'm guessing that if you applied the String function to
> those four bytes that the string "Test" would miraculously
> appear. This is similar to writing secret notes in lemon
> juice. Hold the blank paper near a flame and your lover's
> note miraculously appears!!
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Obviously.

The point of the sample program above is to save v3 as a string, not
as a byte array, in the HDF file.

BRIAN
Re: HDF_VD_WRITE for string data [message #62874 is a reply to message #62871] Tue, 14 October 2008 05:44 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Brian writes:

> 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.

I'm guessing that if you applied the String function to
those four bytes that the string "Test" would miraculously
appear. This is similar to writing secret notes in lemon
juice. Hold the blank paper near a flame and your lover's
note miraculously appears!!

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: HDF_VD_WRITE for string data [message #62969 is a reply to message #62871] Tue, 14 October 2008 06:29 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Brian writes:

> Obviously.
>
> The point of the sample program above is to save v3 as a string, not
> as a byte array, in the HDF file.

I'm just suggesting this might be as good as it gets.
Maybe it's smarter than that, but I get *more* cynical
with age, not less. :-(

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Catalyst Library Going Open Source
Next Topic: Re: assign an octal number to a variable

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

Current Time: Sat Oct 11 08:29:53 PDT 2025

Total time taken to generate the page: 1.35976 seconds