(a) he enters any building or part of a building as a trespasser and with intent to commit any such offence as is mentioned in subsection (2); or
(b) having entered any building or part of a building as a trespasser he steals or attempts to steal anything in the building or that part of it or inflicts or attempts to inflict on any person therein any grievous bodily harm.
(2) The offences referred to in subsection (1)(a) are-
(a) stealing anything in the building or part of a building in question;
(b) inflicting on any person therein any grievous bodily harm or raping any woman therein; and
(c) doing unlawful damage to the building or anything therein.
(3) References in subsections (1) and (2) to a building shall apply also to an inhabited vehicle or vessel, and shall apply to any such vehicle or vessel at times when the person having a habitation in it is not there as well as at times when he is.
(3A) The reference in subsection (2)(c) to doing unlawful damage to anything in a building includes-
(a) unlawfully causing a computer in the building to function other than as it has been established by or on behalf of its owner to function, notwithstanding that the unlawful action may not impair the operation of the computer or a program held in the computer or the reliability of data held in the computer;
(b) unlawfully altering or erasing any program, or data, held in a computer in the building or in a computer storage medium in the building; and
(c) unlawfully adding any program or data to the contents of a computer in the building or a computer storage medium in the building. (Added 23 of 1993 s. 6)
(4) Any person who commits burglary shall be guilty of an offence and shall be liable on conviction upon indictment to imprisonment for 14 years.