Description: |
Calculates the nearest whole number. | ||

Class: |
Elemental function; Generic | ||

Arguments: | A | Must be of type real. | |

KIND (opt) | Must be a scalar integer initialization expression. | ||

Results: |
The result is of type real. If KIND is present, the kind parameter is that specified by KIND; otherwise, the kind parameter is that of A. If A is greater than zero, ANINT (A) has the value AINT (A + 0.5); if A is less than or equal to zero, ANINT (A) has the value AINT (A - 0.5). |

Specific Name | Argument Type | Result Type |
---|---|---|

ANINT | REAL(4) | REAL(4) |

DNINT | REAL(8) | REAL(8) |

QNINT | REAL(16) | REAL(16) |

**Examples**

ANINT (3.456) has the value 3.0.

ANINT (-2.798) has the value -3.0.

Previous Page Next Page Table of Contents