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

Home » Public Forums » archive » Re: Problem Compiling and Using Functions
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: Problem Compiling and Using Functions [message #46875 is a reply to message #46804] Sat, 07 January 2006 15:04 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
David Fanning wrote:

> someone@someplace.com writes:
>
>> DOH!... Doh!... doh!... (echoing off into the distance) :)
>>
>> Thanks for your fast response. It works now.
>>
>> I'm new to IDL and I'm not used there being this difference between
>> functions and procedures.
>>
>> So, procedures don't return anything and functions *always* have to
>> return something and the calling function/procedure has handle them
>> correctly.
>
> Yes, this is correct. But if you are going to write your
> functions to return 0s, you have surmised correctly that
> you could just as well use a procedure. All arguments
> to procedures and function alike (including keyword
> arguments) can be passed by reference, so getting things
> into and out of procedure (as well as functions) is
> reasonably trivial.
>
> Just keep chanting to yourself "IDL is NOT C, IDL is NOT C."
>
> Cheers,
>
> David

Hmm I think there was a change you could write a function which does not
need a return inside. It's not that's I like this. I like a clear
definition as above.

IDL> $more test.pro
function test

end

IDL> a=test()
IDL> help,a
A INT = 0


cheers

Reimar
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: archivos
Next Topic: Re: Unicode Question

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

Current Time: Sun Oct 12 13:05:07 PDT 2025

Total time taken to generate the page: 0.24169 seconds