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

Home » Public Forums » archive » Re: Working with lists
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: Working with lists [message #84404 is a reply to message #84394] Mon, 03 June 2013 14:09 Go to previous messageGo to previous message
fgg is currently offline  fgg
Messages: 67
Registered: April 2010
Member
Different error, but still doesn't work here. Btw, I'm running IDL 8.0.1 on Windows 7.

str = replicate('1000 1000.1515 400 40', 10)
str = strsplit(str, /extract)
array = float(str.ToArray())

% LIST::TOARRAY: Unable to convert to type STRING: Element 7
% Error occurred at: LIST::TOARRAY
% $MAIN$
% Execution halted at: $MAIN$



> How about this:
>
>
>
> IDL> str = strsplit(str, /extract)
>
> IDL> str = replicate('1000 1000.1515 400 40', 10)
>
> IDL> str = strsplit(str, /extract)
>
> IDL> array = float(str.ToArray() )
>
> IDL> help, array
>
> ARRAY FLOAT = Array[10, 4]
>
> IDL> print, array[*,0]
>
> 1000.00 1000.00 1000.00 1000.00 1000.00 1000.00 1000.00 1000.00 1000.00 1000.00
>
>
>
> Cheers,
>
> Helder
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: points on a plot
Next Topic: Subscript by -1 HARD to Track Down

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

Current Time: Fri Oct 10 20:22:50 PDT 2025

Total time taken to generate the page: 0.32123 seconds