A hydromechanical transmission that can be used as an efficient continuously variable transmission has a pair of speed sensors for detecting the rotational speeds at the transmission ends of two mechanical transfer lines formed in the transmission, a pair of pressure sensors for detecting the pressures at two positions, an actuator, and a computer. The computer controls the actuator and two clutches in such a way that the system is switched from a low-speed mode to a high-speed mode and vice versa without producing a shock.