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

Home » Public Forums » archive » help with appending strings
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: help with appending strings [message #89296 is a reply to message #89294] Thu, 14 August 2014 11:51 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Thursday, August 14, 2014 2:42:02 PM UTC-4, g.na...@gmail.com wrote:
> Hi all
>
>
>
> So far I was working with 1 pair of stings (total=2 strings) but now I need to work with 180 pairs (total=360 strings). I define my two strings as shown below:
>
>
>
> 1 = 'C:\Users\string1'
>
> 2 = 'C:\Users\string2'
>
>
>
> procedure....
>
>
>
> Because now I need to define 360 strings I was wondering if I can write a loop instead of defined this like this.

Yes you can. Try making an array of strings,
dirs = ['C:\Users\string1', 'C:\Users\string2', 'C:\Users\string3']

And then loop through the strings and operate on them.
for i = 0, n_elements(dirs)-1 do begin
dir = dirs[i]
;; operate on DIR
endfor

Craig
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Is it possible to speed up the Interpolate command?
Next Topic: error with struct expression

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

Current Time: Thu Oct 09 17:21:49 PDT 2025

Total time taken to generate the page: 0.96322 seconds