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

Home » Public Forums » archive » passing variable error
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
passing variable error [message #66258] Sun, 26 April 2009 18:01
xiao zhang is currently offline  xiao zhang
Messages: 81
Registered: June 2008
Member
Sorry, the second post today, I want to pass some variable to a
function from the main program. The variable passed successful in the
first step of the loop but failed in the second step. why is that?
hmmm.........

;main:

for j=0,step-1 do begin
.......

ustars=stars(su,sv,stemp,sp,sdes,stempchange,levels,zs)

ustar=ustars(0)
thetastar=ustars(1)
tempzs=ustars(2)
elasf=ustars(3)

print,'ustar = ',ustar
print,'thetastar = ',thetastar

rustar(j) = ustar
rthetastar(j)= thetastar -------------------------works
here

; help,ustar,thetastar -------------------------they
are floating point

rPBLheight(j+1)=pblheight(thetastar,ustar,tempzs,levels,PBLh eight
(j),stemp)
; does not work here........ in this function

endfor


this is the beginning of the function:

function pblheight,thetastar,ustar,tempzs,levels,PBLheight,stemp
return,pblheight


Thank you very much :P
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: how to check if a loop fails
Next Topic: Re: passing variable error

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

Current Time: Wed Oct 08 20:06:22 PDT 2025

Total time taken to generate the page: 0.03389 seconds