[UP]


Manual Reference Pages  - dim (3)

NAME

DIM(3f) - [FORTRAN:INTRINSIC:NUMERIC] Positive difference

CONTENTS

Syntax
Description
Arguments
Return Value
Example
Standard
Class

SYNTAX

result = DIM(X, Y)

DESCRIPTION

DIM(X,Y) returns the difference X-Y if the result is positive; otherwise returns zero.

ARGUMENTS

X - The type shall be INTEGER or REAL
Y - The type shall be the same type and kind as X.

RETURN VALUE

The return value is of type INTEGER or REAL.

EXAMPLE

Sample program:

    program demo_dim
        integer :: i
        real(8) :: x
        i = dim(4, 15)
        x = dim(4.345_8, 2.111_8)
        print *, i
        print *, x
    end program demo_dim

STANDARD

[[FORTRAN 77]] and later

CLASS

[[Elemental procedure|Elemental function]]


dim (3) March 18, 2019
Generated by manServer 1.08 from 2593a4b5-0952-41a6-95e0-15939cd692db using man macros.