Returns a longword vector containing the one-dimensional subscripts of the nonzero elementsof the input array.
As a side effect, the system variable !Err is set to the number of nonzero elements. This is for compatibility with previous versions of PV-WAVE. Therefore, it is recommended that the Count keyword be used in all new programs, rather than !Err.
index = WHERE ((array GT 50) AND (array LT 100))
result = array(index)
index = WHERE(array, count)
IF (count GT 0) THEN result = array(index)
s = ['this', 'is', 'an', 'array', 'of', 'strings'] PRINT, WHERE(s eq 'an')
2
s = ['this', '', '', 'array', '', 'strings'] PRINT, WHERE(s)
0 3 5
For more information, see Chapter 5, Using Subscripts and Matrices, in the PV-WAVE Programmer's Guide.