Re: Why "Attempt to call undefined procedure/function: 'CGQUERY'" [message #76667] |
Thu, 23 June 2011 19:57 |
wlandsman
Messages: 743 Registered: June 2000
|
Senior Member |
|
|
On Thursday, June 23, 2011 10:09:13 PM UTC-4, Dave wrote:
>
> Very thanks! I found that the al_legend from
> "idlastro.gsfc.nasa.gov/ftp/pro/plot/al_legend.pro" call the function
> "CGQUERY" as a procedure. I have fixed it.
>
>
Actually that procedure call to CGQUERY in AL_LEGEND was supposed to be a call to CGCONTROL. It was in a branch of code that would very rarely be called, so the bug was well-hidden until you tried to run RESOLVE_ROUTINE. I have now fixed AL_LEGEND. Thanks, --Wayne
|
|
|
Re: Why "Attempt to call undefined procedure/function: 'CGQUERY'" [message #76668 is a reply to message #76667] |
Thu, 23 June 2011 19:09  |
Dave[4]
Messages: 38 Registered: December 2007
|
Member |
|
|
On Jun 24, 2:56 am, wlandsman <wlands...@gmail.com> wrote:
> On Thursday, June 23, 2011 1:42:18 PM UTC-4, Dave wrote:
>> % Compiled module: CGQUERY.
>> % Attempt to call undefined procedure/function: 'CGQUERY'.
>
> One way to get the above cryptic message is to call a function as a procedure or vice-versa. You first get the message that the program successfully compiled, but then e.g. the function CGQUERY then can't be found because it was compiled as a procedure.
>
> Are you using your own CGQUERY calls? And calling it as a function?. Presumably, running RESOLVE_ROUTINE on one of the Coyote Graphics routines (e.g. CGPLOT) doesn't run into this problem. --Wayne
Wayne:
Very thanks! I found that the al_legend from
"idlastro.gsfc.nasa.gov/ftp/pro/plot/al_legend.pro" call the function
"CGQUERY" as a procedure. I have fixed it.
Dave
|
|
|
Re: Why "Attempt to call undefined procedure/function: 'CGQUERY'" [message #76675 is a reply to message #76668] |
Thu, 23 June 2011 11:56  |
wlandsman
Messages: 743 Registered: June 2000
|
Senior Member |
|
|
On Thursday, June 23, 2011 1:42:18 PM UTC-4, Dave wrote:
> % Compiled module: CGQUERY.
> % Attempt to call undefined procedure/function: 'CGQUERY'.
One way to get the above cryptic message is to call a function as a procedure or vice-versa. You first get the message that the program successfully compiled, but then e.g. the function CGQUERY then can't be found because it was compiled as a procedure.
Are you using your own CGQUERY calls? And calling it as a function?. Presumably, running RESOLVE_ROUTINE on one of the Coyote Graphics routines (e.g. CGPLOT) doesn't run into this problem. --Wayne
|
|
|