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

Home » Public Forums » archive » a strange loop problem
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
a strange loop problem [message #60946] Mon, 23 June 2008 19:53
bulrushmower is currently offline  bulrushmower
Messages: 19
Registered: February 2008
Junior Member
What is wrong with the loop for the following:
i=0
Print, 'SDS_NAME'+STRTRIM(string(i+1),2), prints SDS_NAME01
But, Band = hdf_sd_nametoindex(file, 'SDS_NAME'+STRTRIM(string(i+1),
2)) is not the same with
Band = hdf_sd_nametoindex(file, SDS_NAME01 )
==========================================
SDS_NAME01 = "SREFL_CH1"
SDS_NAME02 = "SREFL_CH2"
SDS_NAME03 = "BT_CH3"
SDS_NAME04 = "BT_CH4"
SDS_NAME05 = "BT_CH5"
SDS_NAME06 = "SREFL_CH3"
SDS_NAME07 = "SZEN"
SDS_NAME08 = "VZEN"
SDS_NAME09 = "RELAZ"
SDS_NAME10 = "QA"

file = hdf_sd_start(fPath_data
+"AVH09C1.A1998180.N14.002.2007273131632.hdf")

for i=0, 9 do begin
Band = hdf_sd_nametoindex(file, 'SDS_NAME'+STRTRIM(string(i+1),2))
data = hdf_sd_select(file, Band)
hdf_sd_getdata, data, getdata
hdf_sd_endaccess, data

endfor
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL_IDLbridge, break
Next Topic: Extracting subregions from a data cube

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

Current Time: Wed Oct 08 19:12:27 PDT 2025

Total time taken to generate the page: 0.00481 seconds