HP 3000 Manuals

DCMP [ Compiler Library/XL Reference Manual ] MPE/iX 5.0 Documentation


Compiler Library/XL Reference Manual

DCMP 

DCMP compares two integer numbers.

Declaration 

        FUNCTION DCMP(VAR d1,d2:INTEGER):INTEGER; EXTERNAL;

Attributes 

Parameters:               Both arguments are integer numbers.

Result:

                               -1 if D1 < D2
                               0 if D1 = D2
                               1 if D1 > D2

HP FORTRAN 77/XL:         Callable as a system intrinsic:  I = DCMP(J,K).
                          For example, the arithmetic IF statement

                                      IF(I) 10,20,30

                          directs the program as follows:

                                      go to statement 10 if X < Y
                                      go to statement 20 if X = Y
                                      go to statement 30 if X > Y

Error:                    None.



MPE/iX 5.0 Documentation