PROGRAM Test_Call C ***** Program to Test Calling a Macro Routine ***** C ***** Rev. 27-MAY-1991 ***** C ***************************************** C DEFINE ALL VARIABLES AND ARRAYS C ***************************************** IMPLICIT NONE INTEGER*4 TestInteger,ReturnInteger C ********************************************************************** C Advertize what this program is and get an "integer" to work with. C ********************************************************************** WRITE ( 6, 30 ) 30 FORMAT ( ///// & ' ****************************************** '/ & ' * * '/ & ' * This program is the framework to * '/ & ' * test calling a MACRO routine * '/ & ' * from FORTRAN * '/ & ' * * '/ & ' * Revision 27-MAY-1991 * '/ & ' ****************************************** '// ) 40 WRITE ( 6, 50 ) 50 FORMAT ( // & ' To QUIT this program Enter a negative number ', / & ' or else, ', / & ' Enter a decimal number between 0 and 127. ', $ ) READ ( 5, 55 ) TestInteger 55 FORMAT ( I4 ) IF ( TestInteger .LT. 0 ) THEN GOTO 998 END IF WRITE ( 6, 60 ) TestInteger 60 FORMAT ( // ' The input integer is: ', I4 ) C ********************************************************************** C Now call the SubRoutine C ********************************************************************** CALL TestRoutine (TestInteger,ReturnInteger) C ********************************************************************** C Now show the result of the SubRoutine C ********************************************************************** WRITE ( 6, 80 ) ReturnInteger 80 FORMAT ( // ' The Returned Integer is: ', I4 ) GOTO 40 998 STOP ' ' END