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

Home » Public Forums » archive » Some IDL_Number documentation quirks
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Some IDL_Number documentation quirks [message #93945] Fri, 02 December 2016 11:14 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
A few quirks in the IDL documentation for IDL_Number

http://www.harrisgeospatial.com/docs/IDL_Number.html

1. The example for IDL_Number::Median method reads
*********
Print the median value of a number:

num = -24601

PRINT, num.Median( )

IDL prints:

24601
**********
Huh? The median of a negative scalar is its absolute value? I then realized that this example is probably an unfinished copy/paste from the IDL_Number:Signum method. But

2. The example for IDL Number::Signum is incorrect

*********************************
Print the signum value of a number:

num = -24601

PRINT, num.Signum( )

IDL prints:

24601
***********************************
This is closer but still incorrect. The value of num.signum() should be -1 (the sign of the number).

3. The documentation of IDL_Number::Total is incomplete.

**************
Arguments

None.
Keywords

None.
***********

But in fact, although not documented, the dimension argument and five keywords available to the TOTAL() function are also available to IDL_Number::Total. For example

IDL> a = indgen(3,3)
IDL> a
0 1 2
3 4 5
6 7 8
IDL> a.total(1,/integer)
3 12 21
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Is it possible to get a free version of coomand line IDL program ?
Next Topic: Crowd support wanted for adding metadata to READ_PNG and WRITE_PNG

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

Current Time: Wed Oct 08 11:56:45 PDT 2025

Total time taken to generate the page: 0.00251 seconds