f90ints Subroutine

subroutine f90ints(i1, i2, i3, i4, rc)

Uses

Arguments

Type IntentOptional Attributes Name
integer :: i1
integer :: i2
integer :: i3
integer :: i4
integer :: rc

Source Code

subroutine f90ints(i1, i2, i3, i4, rc)
    use ESMF
    implicit none

    integer :: i1, i2, i3, i4
    integer :: rc

    integer :: check_i1, check_i2, check_i3, check_i4
 
    ! these must match the values in the main program
    check_i1 = 102
    check_i2 = 204
    check_i3 = 409
    check_i4 = 819


    print *, "-- entering f90ints subroutine"
    print *, " ints=", i1, i2, i3, i4

    ! assume ok, then set failure if any values do not match
    rc = ESMF_SUCCESS

    if (check_i1 .ne. i1) rc = ESMF_FAILURE
    if (check_i2 .ne. i2) rc = ESMF_FAILURE
    if (check_i3 .ne. i3) rc = ESMF_FAILURE
    if (check_i4 .ne. i4) rc = ESMF_FAILURE

    print *, " rc=", rc
    print *, "-- exiting f90ints subroutine"

end subroutine f90ints