Previous IDL Reference Guide: System Variables Next

Constant System Variables

The following system variables contain predefined constants or values for use by IDL routines. System variables can be used just like other variables. For example, the command:

PRINT, ACOS(A) * !RADEG  

converts a result expressed in radians to one expressed in degrees.

!DPI

A read-only variable containing the double-precision value of pi (p).

!DTOR

A read-only variable containing the floating-point value used to convert degrees to radians (p/180 @  0.01745).

!MAP

An array variable containing the information needed to effect coordinate conversions between points of latitude and longitude and map coordinates. The values in this array are established by the MAP_SET procedure; the user should not change them directly.

!PI

A read-only variable containing the single-precision value of pi (p).

!RADEG

A read-only variable containing the floating-point value used to convert radians to degrees (180/p @ 57.2958).

!VALUES

A read-only variable containing the IEEE single- and double-precision floating-point values Infinity and NaN (Not A Number). !VALUES is a structure variable with the following fields:

** Structure !VALUES, 4 tags, length=24:  
   F_INFINITY      FLOAT          Infinity  
   F_NAN           FLOAT               NaN  
   D_INFINITY      DOUBLE         Infinity  
   D_NAN           DOUBLE              NaN  

where the meaning of the fields as follows:

F_INFINITY

The single-precision floating point value Infinity.

F_NAN

The single-precision floating point value NaN (Not a Number).

D_INFINITY

The double-precision floating point value Infinity.

D_NAN

The double-precision floating point value NaN (Not a Number).

For more information on these special floating-point values, see Special Floating-Point Values.

  IDL Online Help (March 06, 2007)