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

Home » Public Forums » archive » Weird compilation behaviour...
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
Weird compilation behaviour... [message #87520] Wed, 12 February 2014 05:37 Go to next message
stefan.meingast is currently offline  stefan.meingast
Messages: 30
Registered: June 2012
Member
Hey

I have been experience very strange things with a part of my code. Until recently everything worked normally, but suddenly a compilation error popped up.

I will post the part of the code at the end of this message. When I compile it I get a syntax error in line 23 and 39 at the location of the first '=' sign, even though there is no error in the code. If I comment everything of the first plot command (the errorplot), then the rest compiles fine. Now when I reactivate the errorplot, the entire code compiles without errors. Any ideas what might be causing this?

I am using IDL 8.1 and I can't upgrade since its too expensive. :(

Any help would be appreciated!!
thanks



Here is the part of the code that gives me trouble written in a stand-alone dummy program:

PRO dummy

;Convert MJD-OBS to relative observing time
timearr = (timearr - MIN(timearr)) * 24D

;Generate QC ZP plot
plot = ERRORPLOT(photstab, czp[0,*], czp[1,*], $
ERRORBAR_COLOR = 'BLACK', $
ERRORBAR_CAPSIZE = 0.1, $
LINESTYLE = '-', $
THICK = '2', $
COLOR = 'BLACK', $
'o', SYM_FILLED = 1, SYM_SIZE = 1, SYM_COLOR='CRIMSON', $
XTITLE = 'Photometric stability ID', $
YTITLE = 'ZP [mag]', $
POSITION = [0.1,0.1,0.9,0.4], $
XRANGE = [0, ncoadds + 2U], $
DIMENSIONS = [1200,800], $
YMAJOR = 5, $
/BUFFER)

;Plot used sources
nplot = PLOT(photstab, czp[2,*], 'o', SYM_COLOR = 'BLACK', $
SYM_FILLED = 1, SYM_SIZE = 1, $
YTITLE = '# sources', $
YMAJOR = 4, $
POSITION = [0.1,0.4,0.9,0.6], $
XRANGE = [0, ncoadds + 2U], $
/CURRENT)

nplot['axis0'].SHOWTEXT = 0
nplot['axis1'].SHOWTEXT = 0
nplot['axis2'].SHOWTEXT = 1
nplot['axis3'].SHOWTEXT = 1

;Replot sorted by time
plotext = MAX(timearr) * 0.02
tplot = PLOT(timearr, czp[0,*], $
LINESTYLE = ' ', $
'o', SYM_FILLED = 1, SYM_SIZE = 1, SYM_COLOR='CRIMSON', $
XTITLE = 'Rel. observing time [h]', $
YTITLE = 'ZP [mag]', $
POSITION = [0.1,0.7,0.9,0.95], $
XRANGE = [0 - plotext, MAX(timearr) + plotext], $
YMAJOR = 5, $
DIMENSIONS = [1200,800], $
/CURRENT)

END
Re: Weird compilation behaviour... [message #87521 is a reply to message #87520] Wed, 12 February 2014 06:17 Go to previous messageGo to next message
Moritz Fischer is currently offline  Moritz Fischer
Messages: 32
Registered: June 2013
Member
Have you tried to rename the plot ( e.g. to plot1) ? Having a variable
and a routine with the same name can cause trouble.

Am 12.02.2014 14:37, schrieb Stefan:
> Hey
>
> I have been experience very strange things with a part of my code.
> Until recently everything worked normally, but suddenly a compilation
> error popped up.
>
> I will post the part of the code at the end of this message. When I
> compile it I get a syntax error in line 23 and 39 at the location of
> the first '=' sign, even though there is no error in the code. If I
> comment everything of the first plot command (the errorplot), then
> the rest compiles fine. Now when I reactivate the errorplot, the
> entire code compiles without errors. Any ideas what might be causing
> this?
>
> I am using IDL 8.1 and I can't upgrade since its too expensive. :(
>
> Any help would be appreciated!! thanks
>
Re: Weird compilation behaviour... [message #87522 is a reply to message #87521] Wed, 12 February 2014 06:53 Go to previous message
stefan.meingast is currently offline  stefan.meingast
Messages: 30
Registered: June 2012
Member
Cool. That fixed it thanks a lot. In two year of IDL programming this has never been a problem, but you are right, I should change the habit of naming the plot after the function. ;)

thanks again!!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Modern IDL 1.3 for IDL 8.3
Next Topic: READU: Error encountered reading from file.

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

Current Time: Wed Oct 08 13:53:14 PDT 2025

Total time taken to generate the page: 0.00570 seconds