Studies of4He emission in both fusion-like and inelastic reactions of 340-MeV40Ar+238U