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

Home » Public Forums » archive » Re: Undefined function/procedure message
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
Re: Undefined function/procedure message [message #43399] Tue, 12 April 2005 09:28
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
elias writes:

> My program structure is the following one:
>
> pro main
>
> (...)
>
> ;user routine for writing out channels
> for iu=0, n_elements(user_procedure)-1 do begin
> call_procedure,user_procedure(iu),chst
> endfor
>
> (...)
>
> end
>
> The "user_procedure" is just a filename that I define when calling
> name, for example:
>
> main, user_procedure='user1.pro'
>
> I have created and complied a user1.pro file, before I run and compile
> main.
>
> But after I run "main, user_procedure='user1.pro' ", I get the message
> that "user1.pro is undefined function or procedure".
>
> The same code was tested in another computer and it worked, so I am not
> sure what is the mistake in my case. Maybe some idl configuration error?

Oh, never mind that last post. Too quick on the Send button,
as the puppies were yelping and I was momentarily distracted. :-)

"user1.pro" is an odd name. Is that the name of the program
module *inside* user1.pro? If you compile user1.pro, whatever the
name is of the module that gets compiled (look at your messages),
*that* is what you should be using.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Undefined function/procedure message [message #43400 is a reply to message #43399] Tue, 12 April 2005 09:07 Go to previous message
Antonio Santiago is currently offline  Antonio Santiago
Messages: 201
Registered: February 2004
Senior Member
> call_procedure,user_procedure(iu),chst
> ...
> main, user_procedure='user1.pro'

Test with user_procedure='user1' without '.pro'. The procedure name
once compiled is 'user1' not 'user1.pro'.

Bye.
Re: Undefined function/procedure message [message #43401 is a reply to message #43400] Tue, 12 April 2005 09:06 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
elias writes:

> My program structure is the following one:
>
> pro main
>
> (...)
>
> ;user routine for writing out channels
> for iu=0, n_elements(user_procedure)-1 do begin
> call_procedure,user_procedure(iu),chst
> endfor
>
> (...)
>
> end
>
> The "user_procedure" is just a filename that I define when calling
> name, for example:
>
> main, user_procedure='user1.pro'
>
> I have created and complied a user1.pro file, before I run and compile
> main.
>
> But after I run "main, user_procedure='user1.pro' ", I get the message
> that "user1.pro is undefined function or procedure".
>
> The same code was tested in another computer and it worked, so I am not
> sure what is the mistake in my case. Maybe some idl configuration error?

The file user1.pro is probably not in a directory that
is being searched in your !PATH.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Undefined function/procedure message
Next Topic: Re: Get IDLgrText size

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

Current Time: Thu Oct 09 23:45:43 PDT 2025

Total time taken to generate the page: 0.00719 seconds