The idea of a computer-controlled range-compensating system for heavy charged particle radiotherapy, the multibar compensator, is proposed. By stacking multiple energy-absorbing layers along the beam, each of which has structure and behaviour similar to those of a multileaf collimator, variable range compensation will be achieved. The analysis of the conventional range compensators actually used for treatment concluded that the proposed system would not seriously degrade the treatment quality for the most cases, except for tumours in the head and neck region where 1 mm precision may be required. The system will even be able to coexist with the conventional range compensators to provide either method depending on clinical situations.