ceiling(3f) - [FORTRAN:INTRINSIC:NUMERIC] Integer ceiling function
Syntax
Description
Arguments
Return Value
Example
Standard
Class
See Also
result = ceiling(a [, kind])
ceiling(a) returns the least integer greater than or equal to A.
A - The type shall be REAL. KIND - (Optional) An INTEGER initialization expression indicating the kind parameter of the result.
The return value is of type integer(kind) if KIND is present and a default-kind INTEGER otherwise.
Sample program:
program demo_ceiling real :: x = 63.29 real :: y = -63.59 print *, ceiling(x) ! returns 64 print *, ceiling(y) ! returns -63 end program demo_ceiling
[[Fortran 95]] and later
[[Elemental procedure|Elemental function]]
[[floor]], [[nint]]
ceiling (3) | March 18, 2019 |