!-----  Ex3_4: Triangle Pulse   -----
      REAL :: x, f
      PRINT*, 'x?'
      READ*, x
         IF( x < 0.0 ) THEN
               f = 0.0
         ELSE IF( x < 1.0 ) THEN
               f = x
         ELSE IF( x < 2.0 ) THEN
               f = -x + 2.0
         ELSE
               f = 0.0
         END IF
         PRINT*, x, f
      END