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 #60944 is a reply to message #60943] Mon, 23 June 2008 21:26 Go to previous messageGo to previous message
bulrushmower is currently offline  bulrushmower
Messages: 19
Registered: February 2008
Junior Member
On Jun 23, 10:10 pm, David Fanning <n...@dfanning.com> wrote:
> bulrushmo...@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.")

Thanks David,
But problem is still there.
ENVI> help, band
BAND LONG = -1

It should be: BAND LONG = 0
But IDL> Band = hdf_sd_nametoindex(file,SDS_NAME01) prints:
BAND LONG = 0

Any idea about that? Basically, I am reading an HDF file.

Thanks
[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: Thu Oct 09 21:47:55 PDT 2025

Total time taken to generate the page: 1.28446 seconds