(1) Whe neve r any person is convict ed of an offence punishable under section 3 or under section 4, and the Court conv ictin g him is of opinion th at it is necessary to requir e such person to execu te a bond for absta ining from the commission of such offence, the Co ur t, may, at the time o f passing sentence on such pers on, ord er him tc execute a bond for a sum proport ion ate to his means, with or without sure ties, for a bstain ing from the commission of such offence during such perio d, no t exceeding three years, as i t thinks fit to fix.
(2) Th e bond shall be in the prescribed form and the provis ion of the Code of C rim ina l Procedure , 1898 (Act V of 1898), shall , in so far as they ar e app lica ble , app ly to all ma tte rs connected with such bond as if it were a bond to keep the peace ordered to be executed under section 106 of th at Code .
(3) I f the conv iction is set aside on appeal or otherwise, the bond executed sha ll become void.
4
(4) Any ord er under this section may also be made by an Appella te Co ur t, or by the Hig h Co ur t when exercising its powers of revision .