Converts an expression tolongword integer data type.
Extracts data from an expression and places it in alongword integer scalar or array.
offset
dimi
If the values of expr are not within the range of a long integer, a misleading result occurs and a message may be displayed.
For example, suppose
A = 2.0 ^ 31 + 2
. The following commands,
B = LONG(A) C = LONG(-A)
B = 2147483647 C = -2147483648
a = FINDGEN(6) + 0.5
PRINT, a
0.500000 1.50000 2.50000 3.50000 4.50000
5.50000
b = LONG(a)
a
to type longword.
INFO, b
VARIABLE LONG = Array(6)
a
were truncated
; by LONG.
PRINT, b
0 1 2 3 4 5
b
, and place them in a
.
c = LONG(b, 8, 2, 2)
INFO, c
VARIABLE LONG = Array(2, 2)
PRINT, c
2 3
4 5
For more information on using this function to extract data, see the PV-WAVE Programmer's Guide.