John P. Outlaw, Jr., was convicted of criminal sexual conduct with a minor in the second degree and was sentenced to twenty years imprisonment. He appeals. We affirm.
The victim, born in December of 1974, is Outlaw’s stepdaughter. She testified regarding two instances in August of 1989 where Outlaw sexually assaulted her. She also testified about several prior attempts over the last four years.
Outlaw raises three issues on appeal. He first contends the trial judge erred in denying his motion for a mistrial following the State’s examination of him regarding an unrelated, unsubstantiated prior bad act.
On direct examination, in response to questions regarding the allegations made by his step-daughter, Outlaw stated, “I have never done nothing like that to no child.” On cross-examination, the solicitor reminded him of this testimony and then, without objection, asked Outlaw whether he had molested his niece. The solicitor asked several questions indicating Outlaw had harassed his niece into changing her testimony stating, “she just disappeared into North Carolina after you called her every single day to get her to change her testimony.” After Outlaw denied this, the solicitor asked him if he believed this was some big conspiracy against him. At this point, Outlaw’s counsel made a motion for a mistrial stating this evidence did not come within an exception under State v. Lyle, 125 S.C. 406, 118 S.E. 803 (1923). The prosecutor argued she was not offering substantive evidence under Lyle but was impeaching Outlaw. The trial judge overruled the motion and stated, “I’ll charge them that and we’ll go forward.”
The record before us shows Outlaw failed to make a contemporaneous objection to the above line of questioning. Failure to contemporaneously object to a line *349of questioning subsequently advanced as prejudicial cannot be later bootstrapped by a motion for a mistrial. State v. Lynn, 277 S.C. 222, 284 S.E. (2d) 786 (1981). Further, the issue before us is not the introduction of substantive evidence of other bad acts falling under Lyle. Rather, it involves impeachment of a testifying defendant on cross-examination. When an accused takes the stand, he becomes subject to impeachment like any other witness, and regardless of whether he offers evidence of his good character, he may be cross-examined about past transactions tending to affect his credibility. State v. Major, — S.C. —, 391 S.E. (2d) 235 (1990). He may be asked about prior bad acts, not the subject of a conviction, which go to his credibility. Id. 391 S.E. (2d) at 237. This is precisely what the solicitor did in the case at hand.
Outlaw next contends the trial judge erred in his charge to the jury on the limiting effect of a prior criminal charge on Outlaw’s credibility. In his charge to the jury, the trial judge stated as follows:
The fact that a defendant has had some other crime charged against him does not mean that he would commit this crime. It goes to his credibility as a witness. You have been selected as fair and impartial jurors, sworn to impartially determine the facts of this case. You comply with your oaths so that no one would have a right to criticize your verdict and you would have fully discharged your duties as jurors.
The law is clear that the jury must be charged that evidence of prior convictions is admissible only for impeachment. State v. Brown, 296 S.C. 191, 371 S.E. (2d) 523 (1988). For the same reasons, where evidence of prior bad acts is offered for impeachment purposes, the jury must be charged as to its limiting effect. While the trial judge may have worded the charge better by stating the defendant may have had some prior bad acts charged against him, we find any error in the terminology used by him could not reasonably have affected the result and was, therefore, harmless. See State v. Bailey, 298 S.C. 1, 377 S.E. (2d) 581 (1989) and State v. Sherard, 399 S.E. (2d) 595 (1991) (a conviction will not be set aside due to insubstantial errors not affecting the result).
*350Finally, Outlaw contends the trial judge erred in sentencing him to twenty years for his conviction of second degree criminal sexual conduct with a minor under S.C. Code Ann. § 16-3-655 (1976), arguing the maximum term of punishment is only ten years under S.C. Code Ann. § 17-25-20 (1976).1
We first note that Outlaw’s counsel made no specific objection to the sentence after it was rendered by the court. Failure to object to a sentence at the time it is imposed precludes a defendant from challenging it on appeal. State v. Shumate, 276 S.C. 46, 275 S.E. (2d) 288 (1981). At any rate, we find the sentence of twenty years proper. The primary rule of statutory construction requires that legislative intent must prevail if it can reasonably be discovered in the language used construed in light of the intended purpose. In construing statutory language, the statute must be read as a whole and sections which are part of the same general statutory law of the state must be construed together. Smalls v. Weed, 293 S.C. 364, 360 S.E. (2d) 531 (Ct. App. 1987). Outlaw was charged and convicted under § 16-3-655(3) (1976) which provides as follows:
A person is guilty of criminal sexual conduct in the second degree if the actor engages in sexual battery with a victim who is at least fourteen years of age but who is less than sixteen years of age and the actor is in a position of familial, custodial, or official authority to coerce the victim to submit or is older than the victim.
While this section does not provide for a sentence itself, in the same Act, S.C. Code Ann. § 16-3-653(2) (1976) provides that criminal sexual conduct in the second degree is a felony punishable by imprisonment for not more than twenty years. We find it was the clear intent of the legislature that the definitional sections of 16-3-655(2) and (3) should be read in conjunction with the punishment provided by § 16-3-653(2).
Affirmed.
Gardner and Bell, JJ., concur.