Community orders
337.—(1)  Subject to subsections (2) and (3), a court shall not exercise any of its powers under this Part to make any community order in respect of —
(a)an offence for which the sentence is fixed by law;
(b)an offence for which a specified minimum sentence or mandatory minimum sentence of imprisonment or fine or caning is prescribed by law;
(c)an offence which is specified in the Third Schedule to the Registration of Criminals Act (Cap. 268);
(d)a person who had previously been sentenced to a term of imprisonment, other than a term of imprisonment served by him in default of payment of a fine;
(e)a person who had previously been sentenced to reformative training, corrective training or preventive detention;
(f)a person who had previously been detained or subject to police supervision under section 30 of the Criminal Law (Temporary Provisions) Act (Cap. 67);
(g)a person who had previously been admitted to an approved institution under section 34 of the Misuse of Drugs Act (Cap. 185) or to an approved centre under section 17 of the Intoxicating Substances Act (Cap. 146A);
(h)an offence which is punishable with a fine only; or
(i)an offence which is punishable with a term of imprisonment which exceeds 3 years.
(2)  A court may not make a mandatory treatment order in respect of any case referred to in subsection (1) except that it may do so under section 339 even if the offender —
(a)had previously been sentenced to a term of imprisonment, whether or not it is a term of imprisonment served by him in default of payment of a fine; or
(b)had previously been admitted to an approved institution under section 34 of the Misuse of Drugs Act (Cap. 185) or to an approved centre under section 17 of the Intoxicating Substances Act (Cap. 146A).
(3)  A court may not make a community work order in respect of any case referred to in subsection (1) except that it may do so under section 344 even if the offender is convicted of ––
(a)an offence which is punishable with a fine only; or
(b)an offence for which a specified minimum sentence of fine or a mandatory minimum sentence of fine is prescribed by law.
(4)  If an offender convicted of 2 or more offences is sentenced at the same court proceeding for those offences, a court shall not pass a community sentence if any of those offences relate to an offence in respect of which the powers to make community orders conferred by this Part cannot be exercised by the court.
(5)  Subject to section 344(11)(b), a community sentence passed by a court in respect of any offence shall be in lieu of any sentence of imprisonment, caning and fine which the court may impose for that offence.