Informats |
Category: | Numeric |
Syntax | |
Syntax Description | |
Details | |
Examples |
Syntax |
IEEEw.d |
specifies the width of the input field.
Details |
The IEEEw.d informat is useful in operating environments where IEEE is the floating-point representation that is used. In addition, you can use the IEEEw.d informat to read files that are created by programs on operating environments that use the IEEE floating-point representation.
Typically, programs generate IEEE values in single precision (4 bytes) or double precision (8 bytes). Truncation is performed by programs solely to save space on output files. Machine instructions require that the floating-point number be of one of the two lengths. The IEEEw.d informat allows other lengths, which enables you to read data from files that contain space-saving truncated data.
Examples |
input test1 ieee4.; input test2 ieee5.;
Data Line* | Results |
---|---|
----+----1----+ |
|
3F800000 |
1 |
3FF0000000 |
1 |
* The data lines are hexadecimal representations of binary numbers that are stored in IEEE format. |
The first INPUT statement reads the first data line, and the second INPUT statement reads the next data line.
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.