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

Home » Public Forums » archive » Re: Creating files
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Creating files [message #81164] Thu, 23 August 2012 12:49
Jordan Guerra is currently offline  Jordan Guerra
Messages: 5
Registered: August 2012
Junior Member
It worked!

Thanks Jimmy.

On Thursday, August 23, 2012 1:55:54 PM UTC-4, jimmylee...@gmail.com wrote:
> On Thursday, August 23, 2012 11:38:51 AM UTC-6, Jordan Guerra wrote:
>
>> Hi,
>
>>
>
>>
>
>>
>
>> I want to create a sequence of files in the form 0001.idlsav, 0002.idlsav ... 4000.idlsav; each one correspond to a different i in a for loop, but I don't know how to convert the interger 1 into a string in the form 0001, for example.
>
>>
>
>> Any ideas?
>
>>
>
>> Thanks!
>
>
>
> Use the format (I4.4) when building your file name string.
Re: Creating files [message #81165 is a reply to message #81164] Thu, 23 August 2012 11:10 Go to previous message
Russell Ryan is currently offline  Russell Ryan
Messages: 122
Registered: May 2012
Senior Member
On Thursday, August 23, 2012 1:38:51 PM UTC-4, Jordan Guerra wrote:
> Hi,
>
>
>
> I want to create a sequence of files in the form 0001.idlsav, 0002.idlsav ... 4000.idlsav; each one correspond to a different i in a for loop, but I don't know how to convert the interger 1 into a string in the form 0001, for example.
>
> Any ideas?
>
> Thanks!

try this:

for i=0.3999 do print,string(i+1,f='(I04)')

-Russell
Re: Creating files [message #81166 is a reply to message #81165] Thu, 23 August 2012 10:55 Go to previous message
Jim  Pendleton is currently offline  Jim Pendleton
Messages: 165
Registered: November 2011
Senior Member
On Thursday, August 23, 2012 11:38:51 AM UTC-6, Jordan Guerra wrote:
> Hi,
>
>
>
> I want to create a sequence of files in the form 0001.idlsav, 0002.idlsav ... 4000.idlsav; each one correspond to a different i in a for loop, but I don't know how to convert the interger 1 into a string in the form 0001, for example.
>
> Any ideas?
>
> Thanks!

Use the format (I4.4) when building your file name string.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Creating files
Next Topic: Appending to Shapefile Woes

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

Current Time: Wed Oct 08 13:39:56 PDT 2025

Total time taken to generate the page: 0.00494 seconds