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

Home » Public Forums » archive » Yet again, The Sky is Falling!
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: Yet again, The Sky is Falling! [message #52970 is a reply to message #52872] Fri, 09 March 2007 10:27 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
David Fanning wrote:
> mgalloy@gmail.com writes:
>
>> Moral of the story: don't change the value of input parameters.
>
> Except, of course, when that is the POINT of the input parameter.

But, then it's not an input parameter. It's an output.

I'm f95-centric, and I know it doesn't apply completely to IDL for a number of reasons,
but I don't think people should new code where the functionality depends on *how* the
arguments are passed (i.e. by value or reference).

It's a shame IDL doesn't allow for something similar to the fortran95 intent attribute for
arguments, e.g.

function myfunc(x,y,z) result(a)
real, intent(in) :: x, y, z
real :: a
...
x = 1.0 ! Illegal. Compiler will not allow mods to intent IN argument
...
end function myfunc

cheers,

paulv

--
Paul van Delst Ride lots.
CIMSS @ NOAA/NCEP/EMC Eddy Merckx
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: mpeg creation problem
Next Topic: reading many files

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

Current Time: Sat Oct 11 00:45:35 PDT 2025

Total time taken to generate the page: 0.80362 seconds