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

Home » Public Forums » archive » Writing an 8 Column array into a data file
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: Writing an 8 Column array into a data file [message #87575 is a reply to message #87571] Sat, 15 February 2014 09:59 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
drewciampa@gmail.com writes:

> Also, maybe you guys could still help with whats going on with the hexadecimal data. That array contains string type variable, and when I write it to a file I only get the first number of each element. some sample code is below:
>
> array1 STRING = Array[1, 5]
>
> the array contains:
> [2b40e2200ff00007, 2b40e2200ff00009, 2b40e2200ff0000c, 2b40e2200ff00011, 2b40e2200ff00019]
>
> openw, lun, 'test.dat', /get_lun
> printf, lun, array1, FORMAT='(Z16)'
> close,lun
>
> what I get is:
> 2
> 2
> 2
> 2
> 2
>
> Any clue why this might be?

Confusion on your part, I'm going to guess. :-)

What exactly are you trying to do? The array does NOT look like it
contains string variables. If it *did* contain string variables, you
could just write them out as strings. If you are trying to write the
strings out as hexadecimal numbers, then IDL has to convert them to
hexadecimals to write them. A number "b" doesn't make much sense in this
conversion process, so IDL does what I would do, gives up and goes gets
a beer. What would you do?

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: MPFIT2DFUN- use for a time series of images?
Next Topic: Adding Legends to Coyote Graphics Windows

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

Current Time: Wed Oct 08 18:26:03 PDT 2025

Total time taken to generate the page: 0.00249 seconds