PROGRAM FORTRAN_Traps
   IMPLICIT NONE
  
   INTEGER, PARAMETER  :: A = 2, B = 2, H = 3 
   INTEGER, PARAMETER  :: O = 4, P = 6
   CHARACTER(LEN=5), PARAMETER :: M = 'Smith', N = 'Texas'
   CHARACTER(LEN=4), PARAMETER :: X = 'Smith'
   CHARACTER(LEN=6), PARAMETER :: Y = 'TEXAS'

! Exponential Trap

   WRITE(*,*) "First, the exponential trap:"
   WRITE(*,*) 
   WRITE(*,*) A, ' ** ', B, ' ** ', H, ' = ', A**B**H
   WRITE(*,*) '( ', A, ' ** ', B, ' ) ** ', H, ' = ', (A**B)**H
   WRITE(*,*) A, ' ** ( ', B, ' ** ', H, ' ) = ', A**(B**H)
   WRITE(*,*)

! The integer division trap. Intrinsic function REAL() congerts
! an integer to a real number


   WRITE(*,*) "Second, the integer division trap:"
   WRITE(*,*) 
   WRITE(*,*) O, ' / ', P, ' = ', O / P
   WRITE(*,*) 'REAL( ', O,' ) / ', P, ' = ', REAL(O)/P
   WRITE(*,*) O, ' / REAL( ', P, ' )  = ', O/REAL(P)
   WRITE(*,*) 'REAL( ', O,' ) / REAL( ', P, ' )  = ' , REAL(O) / REAL( P )
   WRITE(*,*)

! The string truncation trap

   WRITE(*,*) "Third, the string truncation trap:"
   WRITE(*,*) 'IS ', M, ' STILL IN ', N, '?'
   WRITE(*,*) 'IS ', X, ' STILL IN ', Y, '?'
   WRITE(*,*)

END PROGRAM FORTRAN_Traps
