Chapter Contents

Previous

Next
IBw.d

IBw.d



Writes integer binary (fixed-point) numbers

Category numeric
Width range: 1-8
Default width: 4
Decimal range: 0-10
Alignment: left
Windows specifics: native floating-point representation


Syntax
Details
Examples
Example 1: Processing a Positive Number
Example 2: Processing a Negative Number
See Also

Syntax

IBw.d

w
specifies the width of the output field in bytes (not digits).

d
optionally specifies a scaling factor. When you specify a d value, the IBw.d format multiplies the number by 10d, and then applies the integer binary format to that value.


Details

The IBw.d format converts a double-precision number and writes it as an integer binary (fixed-point) value. Integers are stored in integer-binary (fixed-point) form.

For more information about microcomputer fixed-point values, see Intel Corporation's i486 Microprocessor Programmer's Reference Manual.


Examples

Example 1: Processing a Positive Number

If you format 1.0 as the double-precision number, it is stored as an integer:

01 00 00 00 00 00 00 00

(Remember, Windows stores binary data in byte-reversed order.) The value written depends on the w value you specify.

If you specify the IB4. format, you receive the following value:

01 00 00 00

If you specify the IB2. format, you receive the following value:

01 00

Example 2: Processing a Negative Number

If you try to format -1 with the IB4. format, you receive the following value:

FF FF FF FF

If you specify the IB2. format, you receive the following value:

FF FF

See Also


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.