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

Home » Public Forums » archive » scopes
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
scopes [message #85951] Fri, 20 September 2013 14:28 Go to previous message
spluque is currently offline  spluque
Messages: 33
Registered: September 2013
Member
Hi,

Using the following script to convert calendar date to day of year (test.pro):

FUNCTION calendar2doy, year, month, day
jd=julday(month, day, year)
caldat, jd, Null, Null, year
doy=string(jd - julday(12, 31, year - 1), format='(i03)')
RETURN, doy
END

PRO TEST
year=2011
mon=10
day=15
DOY=calendar2doy(year, mon, day)
RETURN
END


I expected the variable year in the TEST procedure to remain as defined (the long integer 2011), but this is what I see after calling the call to calendar2doy with a breakpoint at the RETURN line:

IDL> .run "test.pro"
% Compiled module: CALENDAR2DOY.
% Compiled module: TEST.
IDL> breakpoint,'test.pro',14
IDL> test
% Compiled module: JULDAY.
% Compiled module: CALDAT.
% Breakpoint at: TEST 14 test.pro
IDL> print, year
2012

What am I missing?

Cheers,
Seb
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to speed up KRIG2D by 30x
Next Topic: cgContour and NaN values

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

Current Time: Wed Oct 08 16:04:21 PDT 2025

Total time taken to generate the page: 0.00205 seconds