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

Home » Public Forums » archive » Re: Little help on arrays - 2nd try
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: Little help on arrays - 2nd try [message #38034] Mon, 16 February 2004 16:56 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
=?ISO-8859-2?Q?F=F6ldy_Lajos?= <foldy@rmki.kfki.hu> writes:
>
> oops, just a little correction:
>
> if (min(x-y, max=max) eq max) and (max eq 0) then print, 'bingo!'

This is fine, and I agree it's likely to be faster, but I prefer to
pull the MIN() function call out of the IF statement. IDL doesn't
appear to guarantee the order of execution within statements, so it's
a bit risky to assume that the variable MAX will always be set
properly. [ Although, it does appear to be here. ]

Also, and this is a bit nit-picky, perhaps it's a bit dangerous to use
a variable named MAX, when a built-in function of the same name is
also present is a recipe for confusion, no?

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Destroying objects
Next Topic: Re: Little help on arrays

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

Current Time: Wed Oct 08 20:10:43 PDT 2025

Total time taken to generate the page: 0.75558 seconds