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

Home » Public Forums » archive » Re: a strange loop problem
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: a strange loop problem [message #60945 is a reply to message #60944] Mon, 23 June 2008 20:10 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
bulrushmower@gmail.com writes:

> What is wrong with the loop for the following:
> i=0
> Print, 'SDS_NAME'+STRTRIM(string(i+1),2), prints SDS_NAME01

I don't think so:

IDL> I=0
IDL> Print, 'SDS_NAME'+STRTRIM(string(I+1),2)
SDS_NAME1

I think you want this:

IDL> I=0
IDL> Print, 'SDS_NAME' + String(I+1, FORMAT='(I2.2)')
SDS_NAME01

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Extracting subregions from a data cube
Next Topic: workbench eclipse 3.3.2 patch

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

Current Time: Fri Oct 10 20:27:13 PDT 2025

Total time taken to generate the page: 0.08163 seconds