Attempt to call undefined procedure: 'DEFAULT' error [message #92017] |
Thu, 01 October 2015 01:29  |
Sir Loin Steak
Messages: 42 Registered: January 2012
|
Member |
|
|
I am trying to use the int_tabulated function, but I keep getting the above error. For example:
IDL> x = [0.,1.,2.,3.]
IDL> f = [3.,4.,7.,12.]
IDL> result = int_tabulated(x, f)
% Compiled module: INT_TABULATED.
% Compiled module: UNIQ.
% Compiled module: DEFAULT.
% Attempt to call undefined procedure: 'DEFAULT'
% Execution halted at: $MAIN$
Now I have a file called default.pro in my idl/lib directory, and IDL can seemingly find it:
IDL> .compile default
% Compiled module: DEFAULT.
IDL> print, file_which('default.pro')
% Compiled module: FILE_WHICH.
/home/idl/lib/default.pro
I have also opened idlde, and in preferences->paths I have set <IDL_DEFAULT> as the first location in the list to see if this helped. The problem still occurs though.
Can anyone offer any help as to what is going on?
Many thanks.
|
|
|
Re: Attempt to call undefined procedure: 'DEFAULT' error [message #92019 is a reply to message #92017] |
Thu, 01 October 2015 10:02   |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 10/1/15 2:29 AM, jf22901 wrote:
> I am trying to use the int_tabulated function, but I keep getting the above error. For example:
>
> IDL> x = [0.,1.,2.,3.]
> IDL> f = [3.,4.,7.,12.]
> IDL> result = int_tabulated(x, f)
> % Compiled module: INT_TABULATED.
> % Compiled module: UNIQ.
> % Compiled module: DEFAULT.
> % Attempt to call undefined procedure: 'DEFAULT'
> % Execution halted at: $MAIN$
>
> Now I have a file called default.pro in my idl/lib directory, and IDL can seemingly find it:
>
> IDL> .compile default
> % Compiled module: DEFAULT.
> IDL> print, file_which('default.pro')
> % Compiled module: FILE_WHICH.
> /home/idl/lib/default.pro
>
> I have also opened idlde, and in preferences->paths I have set
> <IDL_DEFAULT> as the first location in the list to see if this helped.
> The problem still occurs though.
>
> Can anyone offer any help as to what is going on?
>
> Many thanks.
>
Are you sure that <IDL_DEFAULT> is first? Check !path. I think you are
getting a SolarSoft UNIQ instead of the IDL distro UNIQ, which is
causing the need for DEFAULT.
Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
|
|
|
|
Re: Attempt to call undefined procedure: 'DEFAULT' error [message #92034 is a reply to message #92020] |
Fri, 02 October 2015 01:16  |
Sir Loin Steak
Messages: 42 Registered: January 2012
|
Member |
|
|
On Thursday, 1 October 2015 18:11:41 UTC+1, wlandsman wrote:
> On Thursday, October 1, 2015 at 4:29:56 AM UTC-4, jf22901 wrote:
>
>> % Compiled module: DEFAULT.
>> % Attempt to call undefined procedure: 'DEFAULT'
>
> This is the symptom one gets when a function is being called as a procedure, or a procedure is being called as a function. I suspect the default.pro that you have is not the one that int_tabulated.pro is expecting.
>
> It is a bit of a mystery why a procedure/function named default.pro is being called at all. Int_tabulated is supplied by Exelis, and it calls a function uniq.pro also supplied by Exelis. Neither of these call a function named default.pro
>
> But there is a modified version of uniq.pro written by the Solar Library
> https://code.google.com/p/sswgdl/source/browse/trunk/sswgdl/ workarounds/uniq.pro?spec=svn25&r=25
>
> that does call a procedure default.pro. This was poor programming practice -- if you want to modify an Exelis procedure, it is best to use a different name.
Thanks for all the help everyone. It turns out the problem was indeed that I had these additional copies of uniq.pro and default.pro. I must have needed to use them for something in the past, though I don't know what! Without them everything works a treat! :-)
|
|
|