      PROGRAM EXPONE                                                                                                                
C     PROGRAM EXPONE (XIN,       XOUT,       OUTPUT,                    )       C2                                                  
C    1          TAPE1=XIN, TAPE2=XOUT, TAPE6=OUTPUT)                                                                                
C     ----------------------------------------------                            C2                                                  
C                                                                               C2                                                  
C     JUL 03/03 - A.IRWIN,F.MAJAESS (REVISED FOR F90 AND LINUX PLATFORMS)       C2                                                  
C     JAN 29/92 - E. CHAN  (CONVERT HOLLERITH LITERALS TO ASCII)                                                                    
C     MAY 11/83 - R.LAPRISE.                                                                                                        
C     FEB 12/80 - J.D.HENDERSON                                                                                                     
C                                                                               C2                                                  
CEXPONE  - EXPONENTIATES A REAL FILE                                    1  1    C1                                                  
C                                                                               C3                                                  
CAUTHOR  - J.D.HENDERSON                                                        C3                                                  
C                                                                               C3                                                  
CPURPOSE - FILE COMPUTATION  XOUT = EXP(XIN)                                    C3                                                  
C          XIN MUST NOT BE COMPLEX.                                             C3                                                  
C                                                                               C3                                                  
CINPUT FILE...                                                                  C3                                                  
C                                                                               C3                                                  
C      XIN  = INPUT FILE                                                        C3                                                  
C                                                                               C3                                                  
COUTPUT FILE...                                                                 C3                                                  
C                                                                               C3                                                  
C      XOUT = EXP(XIN)                                                          C3                                                  
C---------------------------------------------------------------------------                                                        
C                                                                                                                                   
      IMPLICIT REAL (A-H,O-Z),                                                                                                      
     +INTEGER (I-N)                                                                                                                 
      COMMON/BLANCK/F(65341)                                                                                                        
C                                                                                                                                   
      LOGICAL OK,SPEC                                                                                                               
      COMMON/ICOM/IBUF(8),IDAT(65341)                                                                                               
      DATA MAXX/65341/                                                                                                              
C---------------------------------------------------------------------                                                              
      NFF=3                                                                                                                         
      CALL JCLPNT(NFF,1,2,6)                                                                                                        
      REWIND 1                                                                                                                      
      REWIND 2                                                                                                                      
C                                                                                                                                   
C     * READ THE NEXT GRID FROM FILE XIN.                                                                                           
C                                                                                                                                   
      NR=0                                                                                                                          
  150 CALL GETFLD2(1,F,-1,0,0,0,IBUF,MAXX,OK)                                                                                       
      IF(.NOT.OK)THEN                                                                                                               
        IF(NR.EQ.0)THEN                                                                                                             
          CALL                                     XIT('EXPONE',-1)                                                                 
        ELSE                                                                                                                        
          WRITE(6,6025) IBUF                                                                                                        
          WRITE(6,6010) NR                                                                                                          
          CALL                                     XIT('EXPONE',0)                                                                  
        ENDIF                                                                                                                       
      ENDIF                                                                                                                         
      IF(NR.EQ.0) WRITE(6,6025) IBUF                                                                                                
C                                                                                                                                   
C     * DETERMINE SIZE OF THE FIELD.                                                                                                
C                                                                                                                                   
      KIND=IBUF(1)                                                                                                                  
      SPEC=(KIND.EQ.NC4TO8("SPEC") .OR. KIND.EQ.NC4TO8("FOUR"))                                                                     
      IF(SPEC) CALL                                XIT('EXPONE',-2)                                                                 
C                                                                                                                                   
C     * PERFORM THE ALGEBRAIC OPERATION.                                                                                            
C                                                                                                                                   
      NWDS=IBUF(5)*IBUF(6)                                                                                                          
      DO 210 I=1,NWDS                                                                                                               
  210 F(I)=EXP(F(I))                                                                                                                
C                                                                                                                                   
C     * SAVE ON FILE XOUT.                                                                                                          
C                                                                                                                                   
      IBUF(3)=NC4TO8(" EXP")                                                                                                        
      CALL PUTFLD2(2,F,IBUF,MAXX)                                                                                                   
      NR=NR+1                                                                                                                       
      GO TO 150                                                                                                                     
C---------------------------------------------------------------------                                                              
 6010 FORMAT('0 EXPONE READ',I6,' RECORDS')                                                                                         
 6025 FORMAT(' ',A4,I10,2X,A4,I10,4I6)                                                                                              
      END                                                                                                                           
