comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: help with string manipulation
items: Re: help with string manipulation

help with string manipulation
type: item
description: Hi all I have data named like this: dat(001,001) dat(001,002) dat(001,003) dat(001,004) and so on till a(001,200). I had import my data like this: Data = 'c:\path\dat(001,'+strcompress(i)+').csv' The first part of dat(001,001)is fixed is always 001 but the second part is a string of 3 numbers which have to be created. I want to convert these numbers from 0-200 into a string of 3 numbers. Can anyone knows how to do it? Many Thanks
creator: g.nacarts
date: 2014-08-21T16:14:04-00:00

Re: help with string manipulation
type: item
description: On Thu, 21 Aug 2014 09:14:04 -0700 (PDT), g.nacarts@gmail.com wrote: > Hi all > > I have data named like this: > > dat(001,001) > dat(001,002) > dat(001,003) > dat(001,004) and so on till a(001,200). > > I had import my data like this: > > Data = 'c:\path\dat(001,'+strcompress(i)+').csv' > > The first part of dat(001,001)is fixed is always 001 but the second part is a string of 3 numbers which have to be created. I want to convert these numbers from 0-200 into a string of 3 numbers. Can anyone knows how to do it? > > Many Thanks Please try: filename = 'c:\path\dat(001,'+string(i,format='(i3.3)')+').csv' If you want do go the "IDL way", you can create a string array, including all 201 names: filenames = 'c:\path\dat(001,'+string(indgen(201),format='(i3.3)')+').cs v' HTH, Heinz
creator: Heinz Stege
date: 2014-08-21T16:24:07-00:00