C Library Functions  - in (3)

NAME

in(3f) - [M_math] test if a value occurs in an expected range

CONTENTS

Synopsis
Description
Example

SYNOPSIS

elemental function in(bottom, middle, top)

    ALLOWED_TYPE, intent(in) :: bottom, middle, top
    logical          :: in

where ALLOWED_TYPE may be REAL or INTEGER of default kind from the set

     use,intrinsic :: iso_fortran_env, only : int8, int16, int32, int64, &
     & real32, real64, real128, dp=>real64

All input values must be of the same KIND.

DESCRIPTION

Test if a value is within the range BOTTOM to TOP inclusive. The user is responsible for ensuring BOTTOM is less than or equal to TOP.

EXAMPLE

Sample program

    program demo_in
    use M_math, only : in
    implicit none
       write(*, *)in(1, 3, 10)
       write(*, *)in(1, -30, 10)
       write(*, *)in(1, 30, 10)
       write(*, *)in(-11.11, 5.5, 9.999)
    end program demo_in

Example output

    T

    F

    F

    T


Nemo Release 3.1 in (3) July 22, 2023
Generated by manServer 1.08 from ed0a0df5-3c9f-4fe8-a29e-23f34beb83b3 using man macros.