SUBROUTINE FKHIST
*-- Author : S.Burke / J.V. Morris
      SUBROUTINE FKHIST(LUN,ID,PCT,PMAX)
**********************************************************************                                        
*                                                                    *                                        
* Print a simple histogram (a row of stars)                          *                                        
*                                                                    *                                        
* Print 100*PCT/PMAX stars (max 100) to LUN with id # ID             *                                        
*                                                                    *                                        
**********************************************************************                                        
                                                                        
      CHARACTER*100 STARS                                               
      DATA INIT/0/                                                      
                                                                        
**********************************************************************                                        
                                                                        
      IF (INIT.EQ.0) THEN                                               
         INIT=1                                                         
         DO 100 I=1,100                                                 
            STARS(I:I) = '*'                                            
 100     CONTINUE                                                       
      ENDIF                                                             
                                                                        
      NSTAR = 100.D0*PCT/PMAX                                           
      IF (NSTAR.GT.100) NSTAR = 100                                     
                                                                        
      IF (NSTAR.GT.0) THEN                                              
         WRITE(LUN,1000) ID,PCT,STARS(1:NSTAR)                          
 1000    FORMAT(' ',I4,'  ',F5.1,'  ',A)                                
      ELSE                                                              
         WRITE(LUN,1100) ID,PCT                                         
 1100    FORMAT(' ',I4,'  ',F5.1)                                       
      ENDIF                                                             
                                                                        
      RETURN                                                            
      END                                                               
*