*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> f90/pxfucompare (3)              
Title
Content
Arch
Section
 

Contents


PXFUCOMPARE(3F)					       Last changed: 1-6-98

NAME    [Toc]    [Back]

     PXFUCOMPARE - Compares unsigned integers

SYNOPSIS    [Toc]    [Back]

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

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

DESCRIPTION    [Toc]    [Back]

     On	IRIX systems, 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
     7.2 F77 compiler.

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

     When using	the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
     UNICOS, UNICOS/mk,	or IRIX	systems, all arguments must be of default
     kind unless documented otherwise.	On UNICOS and UNICOS/mk, default
     kind is KIND=8 for	integer, real, complex,	and logical arguments; on
     IRIX, 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.

EXAMPLES    [Toc]    [Back]

     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    [Toc]    [Back]

      
      
     PXFTIMES(3F)

     Application Programmer's Library Reference	Manual,	publication SR2165,
 for the printed version of this man page.

PXFUCOMPARE(3F)					       Last changed: 1-6-98

NAME    [Toc]    [Back]

     PXFUCOMPARE - Compares unsigned integers

SYNOPSIS    [Toc]    [Back]

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

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

DESCRIPTION    [Toc]    [Back]

     On	IRIX systems, 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
     7.2 F77 compiler.

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

     When using	the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
     UNICOS, UNICOS/mk,	or IRIX	systems, all arguments must be of default
     kind unless documented otherwise.	On UNICOS and UNICOS/mk, default
     kind is KIND=8 for	integer, real, complex,	and logical arguments; on
     IRIX, 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.

EXAMPLES    [Toc]    [Back]

     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    [Toc]    [Back]

      
      
     PXFTIMES(3F)

     Application Programmer's Library Reference	Manual,	publication SR2165,
 for the printed version of this man page.

[ Back ]
 Similar pages
Name OS Title
l3tol IRIX convert between 3-byte integers and long integers
strtouq NetBSD convert a string to an unsigned long, unsigned long long, uintmax_t or uquad_t integer
strtoumax NetBSD convert a string to an unsigned long, unsigned long long, uintmax_t or uquad_t integer
strtoul NetBSD convert a string to an unsigned long, unsigned long long, uintmax_t or uquad_t integer
strtoumax FreeBSD convert a string to an unsigned long, unsigned long long, uintmax_t, or u_quad_t integer
strtouq FreeBSD convert a string to an unsigned long, unsigned long long, uintmax_t, or u_quad_t integer
strtoull FreeBSD convert a string to an unsigned long, unsigned long long, uintmax_t, or u_quad_t integer
strtoull NetBSD convert a string to an unsigned long, unsigned long long, uintmax_t or uquad_t integer
strtoul FreeBSD convert a string to an unsigned long, unsigned long long, uintmax_t, or u_quad_t integer
strtoul OpenBSD convert a string to an unsigned long or unsigned long long integer
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service