Under Section 140 of the code wearing the garb or carrying the token of a soldier is made punishable.
Under Section 140, the offence is complete, although no act is done or attempt is made in the assumed official character. The mere circumstance of wearing a garb, or carrying a token, with the intention or knowledge supposed, is sufficient. It is not necessary that something should pass in words. If any act is done then Section 170 will apply. The offence of wearing a garb of a public servant arises when: (i) A person not belonging to a certain class of public servant; (ii) Wears the garb or carries any token of that class; (iii) With the intention that he might be believed as such public servant. A person may both wear the garb of a public servant and use it for the purpose of fraud. In that case the wearing of the garb being subservient to the commission of the greater offence under Section 170 he could only be convicted of that offence, and not of both the offences made punishable by Section 171 and Section 170.
An offence under Section 171 is cognizable, but summons may ordinarily issue in the first instance. It is bailable but not compoundable and is triable by any Magistrate and may be tried summarily.