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

Home » Public Forums » archive » Undefined procedure - however the path is set.
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
Undefined procedure - however the path is set. [message #91518] Thu, 23 July 2015 12:22 Go to next message
Laura Dobor is currently offline  Laura Dobor
Messages: 5
Registered: July 2015
Junior Member
Hi!

I have a problem with running one of my routines.

I have a main routine which call others, and those others again.
They are both in the same folder, which I added to the path. Some of them could be compiled automatically, but some of them not found.

I created a simple test, which worked well:
A main routine call test1.pro which call test2.pro
The same situation with more complex procedures not works....

Any idea?

Thanks,
Laura
Re: Undefined procedure - however the path is set. [message #91519 is a reply to message #91518] Thu, 23 July 2015 12:28 Go to previous messageGo to next message
Laura Dobor is currently offline  Laura Dobor
Messages: 5
Registered: July 2015
Junior Member
And if I compile it manually, with the .compile blah.pro it works well.
(under linux)
Re: Undefined procedure - however the path is set. [message #91520 is a reply to message #91518] Thu, 23 July 2015 12:51 Go to previous messageGo to next message
a146397258 is currently offline  a146397258
Messages: 7
Registered: July 2015
Junior Member
On Thursday, July 23, 2015 at 1:22:31 PM UTC-6, Laura Dobor wrote:
> Hi!
>
> I have a problem with running one of my routines.
>
> I have a main routine which call others, and those others again.
> They are both in the same folder, which I added to the path. Some of them could be compiled automatically, but some of them not found.
>
> I created a simple test, which worked well:
> A main routine call test1.pro which call test2.pro
> The same situation with more complex procedures not works....
>
> Any idea?
>
> Thanks,
> Laura

Are your files named correctly? The file name for each routine needs to be the procedure name for it to compile automatically when it is called.
Re: Undefined procedure - however the path is set. [message #91521 is a reply to message #91520] Thu, 23 July 2015 13:43 Go to previous messageGo to next message
Laura Dobor is currently offline  Laura Dobor
Messages: 5
Registered: July 2015
Junior Member
Yes. Totally the same name (capital letters also checked..I just copy the name to everywhere)

This is what happening:

IDL> .compile MAIN_test.pro
% Compiled module: MAIN_test.
IDL> MAIN_test
% Attempt to call undefined procedure: 'SUB_test'.
% Execution halted at: MAIN_test 41 /home/ldobor/prog/MAIN_test.pro
% $MAIN$

Then if I do this immediately: it is works

IDL> .compile SUB_test.pro
% Compiled module: SUB_test.


When I ask the !PATH I get back my folder where am I and where all of the routines are:

IDL> !PATH
/opt/idl/8.4/idl84/lib/graphics:/opt/idl/8.4/idl84/lib/itool s/framework:/opt/idl/8.4/idl84/lib/itools/components:/opt/id l/8.4/idl84/lib/itools/ui_widgets:/opt/idl/8.4/idl84/lib/ito ols:/opt/idl/8.4/idl84/lib/dicomex:/opt/idl/8.4/idl84/lib/wa velet/data:/opt/idl/8.4/idl84/lib/wavelet/source:/opt/idl/8. 4/idl84/lib/bridges:/opt/idl/8.4/idl84/lib/obsolete:/opt/idl /8.4/idl84/lib/datatypes:/opt/idl/8.4/idl84/lib/hook:/opt/id l/8.4/idl84/lib/imsl:/opt/idl/8.4/idl84/lib/enterprise/ese:/ opt/idl/8.4/idl84/lib/utilities:/opt/idl/8.4/idl84/lib:/home /ldobor/prog:
Re: Undefined procedure - however the path is set. [message #91522 is a reply to message #91518] Thu, 23 July 2015 14:03 Go to previous messageGo to next message
Nikola is currently offline  Nikola
Messages: 53
Registered: November 2009
Member
On Thursday, July 23, 2015 at 8:22:31 PM UTC+1, Laura Dobor wrote:
> Hi!
>
> I have a problem with running one of my routines.
>
> I have a main routine which call others, and those others again.
> They are both in the same folder, which I added to the path. Some of them could be compiled automatically, but some of them not found.
>
> I created a simple test, which worked well:
> A main routine call test1.pro which call test2.pro
> The same situation with more complex procedures not works....
>
> Any idea?
>
> Thanks,
> Laura

If one of the routines is, for example, a procedure, but you call it by mistake as a function, you would get this kind of error.
Re: Undefined procedure - however the path is set. [message #91524 is a reply to message #91521] Thu, 23 July 2015 14:57 Go to previous messageGo to next message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
On Thursday, July 23, 2015 at 3:43:55 PM UTC-5, Laura Dobor wrote:
> Yes. Totally the same name (capital letters also checked..I just copy the name to everywhere)
>

You will save yourself heartache by not using capital letters in file names:
http://www.exelisvis.com/docs/Automatic_Compilation_an.html

An excerpt:

Note: IDL is case-insensitive. However, for some operating systems, IDL only checks for the lowercase filename based on the name of the procedure or function. We recommend that all filenames be lowercase letters.

Could this be the issue?
Re: Undefined procedure - however the path is set. [message #91529 is a reply to message #91524] Fri, 24 July 2015 07:50 Go to previous messageGo to next message
Laura Dobor is currently offline  Laura Dobor
Messages: 5
Registered: July 2015
Junior Member
Hi Philip,

You were right! I'm so grateful :) I change everything to lowercase and it is working now!

I read a lot on exelisvis, but it seems I just missed this lower case issue.

Thanks also to others :)
Re: Undefined procedure - however the path is set. [message #91530 is a reply to message #91522] Fri, 24 July 2015 07:51 Go to previous message
Laura Dobor is currently offline  Laura Dobor
Messages: 5
Registered: July 2015
Junior Member
2015. július 23., csütörtök 16:04:00 UTC-5 időpontban Nikola Vitas a következőt írta:
> On Thursday, July 23, 2015 at 8:22:31 PM UTC+1, Laura Dobor wrote:
>> Hi!
>>
>> I have a problem with running one of my routines.
>>
>> I have a main routine which call others, and those others again.
>> They are both in the same folder, which I added to the path. Some of them could be compiled automatically, but some of them not found.
>>
>> I created a simple test, which worked well:
>> A main routine call test1.pro which call test2.pro
>> The same situation with more complex procedures not works....
>>
>> Any idea?
>>
>> Thanks,
>> Laura
>
> If one of the routines is, for example, a procedure, but you call it by mistake as a function, you would get this kind of error.

I called it right, as a procedure, the problem was that I used capital letter tot the name of the files..... thanks anyway :)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: !x/y.window & convert_coord giving unwanted offset to my image scale
Next Topic: Dynamic Resize Moves Window

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

Current Time: Wed Oct 08 09:16:15 PDT 2025

Total time taken to generate the page: 0.00544 seconds