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

Home » Public Forums » archive » Re: Where is the right place to define new structs?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Where is the right place to define new structs? [message #26509 is a reply to message #26507] Wed, 05 September 2001 00:58 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Olaf Stetzer wrote:
>
> Hello again,
>
> just another question:
>
> I want to implement a function for thermodynamic
> calculations I need. This function needs a parameter
> set as input and returns a parameter set as output, so
> I have to define the structs which hold these sets
> somewhere.
>
> I think that the right place is in the same .pro-file
> which holds the function but I am not sure if IDL is reading
> this definition automatically when I use the function in a
> different program. Here is an example:
>
> foo.pro:
>
> define structs...
>
> function code...
>
> bar.pro:
>
> use one of the structs, then
> call the fuction foo and pass
> the struct to the function.
>
> Thanks for your help,
>
> Olaf
>
> ps: Maybe it is the right time of buying a book on
> IDL-coding now... :-)



Dear Olaf,

IDL searches routines along its search path but it looks first
in the path were idl is in.

cd,current=current
print,current

You can define this path by idlde preferences path or startup.

We prefer the startup method.
Because it is necessary if you have a library and many users
all of them should have the same order of pathes.

You can define a function like

function my_func

struct={a:1}

return,struct
end

If this is saved in the search path it is loaded

by x=my_funct()


If you like named structure you can define them in the startup file
too.

Then you only have to call them by x={name of structure}



regards

Reimar

--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg1/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml

http://www.fz-juelich.de/zb/text/publikation/juel3786.html
============================================================ ======

read something about linux / windows
http://www.suse.de/de/news/hotnews/MS.html
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Display clashes under Red Hat Linux 7.1/IDL 5.2
Next Topic: Re: color bitmap button labels

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

Current Time: Sat Oct 11 12:37:34 PDT 2025

Total time taken to generate the page: 0.56556 seconds