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

Home » Public Forums » archive » Explanation received. (re prev. post)
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
Explanation received. (re prev. post) [message #3219] Fri, 02 December 1994 16:38
Russ Welti is currently offline  Russ Welti
Messages: 27
Registered: October 1994
Junior Member
> The IDL ABS function is a wrapper to the C ABS function. This is the
> value that is returned by that function. I beleive the reason is
> that the absolute value is not really defined for byte data. However,
> I can't really explain what is going on and why it is returning this
> value. You would see the same behavior in a C program. The solution
> is to convert your arguements to integers before taking the absolute
> value.

I guess this makes sense, although I wish the manuals
made note of it, instead of saying that any type may be used with
ABS. For example, it mentions passing strings and complexes to ABS.
Would they also return garbage? Then what's the point?

Maybe it's all so IDL can avoid having a runtime error. But it is
sometimes hard to track down problems like this when a function
like ABS returns something *reasonable*, but wrong.

Anyway, I still like IDL ;) and find the manual is generally good.

\
Russ Welti /-\
(c-g)
University of Washington \-/
Dept. of Molecular Biotechnology M/S FJ-20 /
Seattle, WA 98195 /-\
(206) 685-3840 voice (a-t)
(206) 685-7344 FAX \-/
rwelti@u.washington.edu \
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Please explain this if you can: (short)
Next Topic: RE: Widget version of BOX_CURSOR

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

Current Time: Wed Oct 08 18:13:31 PDT 2025

Total time taken to generate the page: 0.00523 seconds