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 
Return to the default flat view Create a new topic Submit Reply
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
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Gram-Schmidt transformation
Next Topic: Gram-Schmidt transformation

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

Current Time: Sat Oct 11 10:16:13 PDT 2025

Total time taken to generate the page: 1.28115 seconds