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

Home » Public Forums » archive » READ array from a 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: READ array from a file [message #93109 is a reply to message #93085] Thu, 28 April 2016 10:28 Go to previous messageGo to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On Monday, April 25, 2016 at 9:09:25 AM UTC-5, Sapna Mishra wrote:
> Hello All,
>
> I have a file say:
> Detail.txt with contents
>
> name [1,2,3,4] [50.1,60.2,3.1,33.2]
>
> I want to read this file, such as,
>
> readcol,'Detail.txt',f='(A,I,F)',name,arr1,arr2
>
> Such that I should get:
> arr1[0]=1
> arr2[0]=50.1
>
> Can It be done?
> Or other way out?

You're probably going to have to parse something like that yourself. Do you know beforehand how many elements each array will have?

-Jeremy.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: READ ARRAY and extract the values
Next Topic: NetCDF4 problem

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

Current Time: Fri Oct 10 08:36:20 PDT 2025

Total time taken to generate the page: 1.12534 seconds