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

Home » Public Forums » archive » Common block compilation 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
Common block compilation error [message #73686] Mon, 22 November 2010 06:00
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
Hi all,

I'm using the NASA IDL astronomy library's MINF_BRACKET and
MINF_PARABOLIC routines to minimize a function. Doing so requires
that I use a common block for some other parameters. The routine that
calls the minimization routines gets passed the parameters and stores
them in the common block. I had thought that I could name the input
parameters for the calling function as the same as the common block
variables, so that they would be automatically stored, but doing so
gives a compilation error, and so I have to name them differently and
assign their values to the common block variables. Is there any
reason why this should be so? It seems an unnecessary extra step...

--Gray

Code (gives error):

FUNCTION m87_scl, scl
common m87scal, img, im0
return, robust_sigma(img*scl-im0,/zero)
end

FUNCTION m87_scale, img, im0
common m87scal
xa = 0.1 & xb = 10.
minf_bracket, xa, xb, xc, func_name='m87_scl'
minf_parabolic, xa, xb, xc, scl, func_name='m87_scl'
return, scl
end
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Ending a code listing section with IDLdoc
Next Topic: problem with multiple page postscript plots

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

Current Time: Wed Oct 08 15:33:54 PDT 2025

Total time taken to generate the page: 0.00471 seconds