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

Home » Public Forums » archive » Re: Array with mixing data types
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: Array with mixing data types [message #52042] Fri, 05 January 2007 05:29 Go to next message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Julio wrote:
> Hi,
>
> I have a simple question. I'm using the WRITE_SYLK function to export
> an array. The array was built using STRARR function, but I put some
> float numbers inside it.
>
> When I open the *.slk file the float numbers are shown as strings and I
> need to use an excel command to convert into numbers.
>
> How can I do to make an array with different data types?

Hello,

If you can do without SYLK format you could write a comma separated
file. These can be read by most spreadsheets. See
http://dfanning.com/tips/csv_file.html from David Fanning's gold mine.

Ben
Re: Array with mixing data types [message #52046 is a reply to message #52042] Thu, 04 January 2007 21:14 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Julio writes:

> I have a simple question. I'm using the WRITE_SYLK function to export
> an array. The array was built using STRARR function, but I put some
> float numbers inside it.
>
> When I open the *.slk file the float numbers are shown as strings and I
> need to use an excel command to convert into numbers.
>
> How can I do to make an array with different data types?

Lisp, probably. Certainly not in IDL. :-)

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: Array with mixing data types [message #52139 is a reply to message #52046] Fri, 05 January 2007 08:43 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
David Fanning wrote:
> Julio writes:
>
>> I have a simple question. I'm using the WRITE_SYLK function to export
>> an array. The array was built using STRARR function, but I put some
>> float numbers inside it.
>>
>> When I open the *.slk file the float numbers are shown as strings and I
>> need to use an excel command to convert into numbers.
>>
>> How can I do to make an array with different data types?
>
> Lisp, probably. Certainly not in IDL. :-)

Let me plug Ruby:

irb> x=[1,3.14,"hello",true,["embedded",1,"array"],/^\s+/]
irb> x.class
=> Array
irb> x.each {|a| puts a.class}
Fixnum
Float
String
TrueClass
Array
Regexp


veddy kewl.

paulv

--
Paul van Delst Ride lots.
CIMSS @ NOAA/NCEP/EMC Eddy Merckx
Ph: (301)763-8000 x7748
Fax:(301)763-8545
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Gram-Schmidt transformation
Next Topic: Gram-Schmidt transformation

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

Current Time: Mon Apr 13 03:28:59 PDT 2026

Total time taken to generate the page: 1.76599 seconds