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

Home » Public Forums » archive » Re: simple query: including loop variable in filename?
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: simple query: including loop variable in filename? [message #55909 is a reply to message #55906] Fri, 14 September 2007 04:13 Go to previous message
Spon is currently offline  Spon
Messages: 178
Registered: September 2007
Senior Member
On Sep 14, 11:34 am, id6...@googlemail.com wrote:
> Hello Folks,
>
> I'm stranded with server downtime (thankfully with net access!) and
> looking to prepare a start on some IDL; can someone tell me please if
> it's possible to include from a FOR loop the variable we are looping
> over in the filename of some kind of file?
>
> eg;
>
> FOR i=0,1 DO BEGIN
> device, filename='i.jpg'
> plot_image, A
> ENDFOR
>
> so that I can produce filenames 0,1,2..etc.
>
> Thanks,
>
> David.

j=STRING(i)+'.jpg'
DEVICE, FILENAME=j

should do the trick

Chris
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: simple query: including loop variable in filename?
Next Topic: Re: insufficient system resources

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

Current Time: Sun Nov 30 09:36:48 PST 2025

Total time taken to generate the page: 1.52491 seconds