dim(x, y): Positive Difference or 0¶
Positive difference or 0.
Declaración¶
Sintaxis¶
retval = dim(x, y)
Argumentos¶
x
the input value must be of type real or integer.
y
the input value must of of the same type and kind as of x
.
Valores devueltos¶
The return value is of type integer or real.
Descripción¶
dim(x) computes the difference \(x - y\), if the result is positive, otherwise returns 0.
Tipos¶
Supported argument types are real and integer.
Ejemplos¶
program intrinsics_dim
print *, dim(2, 3)
print *, dim(3, 2)
end program
Result:
0
1