pxfucompare(3F)

PXFUCOMPARE - Compares unsigned integers

As shipped in IRIX 6.5.19. Last changed in IRIX 6.5.19.

NAME
     PXFUCOMPARE - Compares unsigned integers

SYNOPSIS
     SUBROUTINE PXFUCOMPARE (i1, i2, icmpr, idiff)
     INTEGER i1, i2, icmpr, idiff

DESCRIPTION
     This routine is in libfortran.so which is linked by default when
     compiling programs with the MIPSpro 7 Fortran 90 compiler or when
     compiling programs with the -craylibs option to the MIPSpro F77
     compiler.

     The PXFUCOMPARE routine performs comparisons of C unsigned integers
     returned by some IEEE FORTRAN 77 routines.

     All arguments must be of default kind unless documented otherwise.  On
     IRIX systems, the default kind is KIND=4.

     The following is a list of arguments for this routine:

     i1        An input integer variable for a C unsigned integer.

     i2        An input integer variable for a C unsigned integer.

     icmpr     An output integer variable that, on return from the routine,
               contains one of these values:
               -1 If i1 < i2
                0 If i1 = i2
                1 If i1 > i2

               All of the comparisons are made using C unsigned integer
               comparisons.

     idiff     An output integer variable that on return from the routine
               contains the absolute value of the difference of i1 and i2.
               Since the values are C unsigned integers and FORTRAN 77 does
               not directly support unsigned integers the value may be
               negative, which indicates the value is beyond the maximum
               positive value of a FORTRAN 77 integer.

NOTES
     The PXF_DEFINITIONS module can be used by Fortran 90 users to enable
     caller-callee interface checking.

EXAMPLES
     In this example, the program calls PXFTIMES(3F) to return the process
     time information and then uses PXFUCOMPARE to determine if the system
     time was greater than 1000000000 clock ticks.

program testpxf
integer itime, jtms, ierr, stime, icmpr, idiff

call PXFSTRUCTCREATE('tms',jtms,ierr)
if (ierr .ne. 0) then
  print *,'FAILED: PXFSTRUCTCREATE call with error = ',ierror
else
  call PXFTIMES(jtms,itime,ierr)
  if (ierr .ne. 0) then
     print *,'FAILED: PXFTIMES call with error = ',ierror
  else
     call PXFINTGET(jtms,'tms_stime',stime,ierr)
     if (ierr .ne. 0) then
        print *,'FAILED: PXFINTGET call for tms_stime with error = ',ierror
     else
        CALL PXFUCOMPARE(stime,1000000000,icmpr,idiff)
        if (icmpr .eq. 1) then
          print *,'System time longer than 1000000000 clock ticks.'
        else
          print *,'System time less than or equal to 1000000000 clock ticks.'
        endif
     endif
  endif
endif
end

SEE ALSO
     PXFTIMES(3F)