1 /*$$$ SUBPROGRAM DOCUMENTATION BLOCK
4 C PRGMMR: ATOR ORG: NP12 DATE: 2009-03-23
6 C ABSTRACT: THIS ROUTINE DEFINES A COMPARISON BETWEEN TWO INTEGERS
7 C FOR USE BY THE BINARY SEARCH FUNCTION BSEARCH.
10 C 2009-03-23 J. ATOR -- ORIGINAL AUTHOR
12 C USAGE: CALL CMPIA( PF1, PF2 )
13 C INPUT ARGUMENT LIST:
14 C PF1 - INTEGER: FIRST INTEGER TO BE COMPARED
15 C PF2 - INTEGER: SECOND INTEGER TO BE COMPARED
17 C OUTPUT ARGUMENT LIST:
18 C CMPIA - INTEGER: RESULT OF COMPARISON:
19 C -1 = PF1 is less than PF2
20 C 0 = PF1 is equal to PF2
21 C 1 = PF1 is greater than PF2
24 C THIS ROUTINE CALLS: None
25 C THIS ROUTINE IS CALLED BY: NUMMTB
26 C Normally not called by any application
31 C MACHINE: PORTABLE TO ALL PLATFORMS
37 int cmpia( const f77int
*pf1
, const f77int
*pf2
)
39 if ( *pf1
== *pf2
) return 0;
41 return ( *pf1
< *pf2
? -1 : 1 );