Converts input to the nearest integer.
If the input is out of the range of integers (for example, if you pass in 1.0d33), an error message will result and NINT returns garbage.
Add ±0.5 to the input and convert that to a short integer using FIX. If the Long keyword is used, it's converted via long. If the input is a FIX, then it's just passed back. If it's a long, it's also passed back. Strings are converted to bytes before the rounding. In the case of complex values, their magnitude is taken. Structures are not allowed.
PRINT, NINT(5.1)
5
PRINT, NINT(5.6)
6
PRINT, NINT(-1.9)
-2
PRINT, NINT([0.1, -20.9, 50.9])
0 -21 51
PRINT, NINT(200000.1)
3392
PRINT, NINT(200000.1, /Long)
200000