All of defendants’ assignments of error relate to the court’s charge to the jury. It is a well established principle of law in this State that the charge of the court will be construed contextually, and segregated portions will not be held prejudicial error when the charge as a whole is free from any prejudice to the defendant. State v. Alexander, 279 N.C. 527, 184 S.E. 2d 274 (1971); State v. McWilliams, 277 N.C. 680, 178 S.E. 2d 476 (1971); State v. Hall, 267 N.C. 90, 147 S.E. 2d 548 (1966); State v. Gatling, 5 N.C. App. 536, 169 S.E. 2d 60 (1969), affirmed 275 N.C. 625, 170 S.E. 2d 593 (1969).
By their first assignment of error defendants contend that the court failed to correctly charge the jury as to which defendant claimed an alibi. At one point in the charge the court mistakenly referred to Winebarger, the State’s witness, when charging about Richards and his alibi, but this mistake was called to the court’s attention and corrected. In other parts of the charge the court correctly stated the evidence concerning Richards and the alibi and in summarizing Gamble’s testimony made no mention of any alibi contention on Gamble’s behalf. The assignment of error is overruled.
*165Defendant Gamble contends the court erred in including his prior criminal record in its instructions to the jury without instructing the jury to consider it only for the specific purpose of impeachment. Nothing in the record shows an objection to testimony regarding Gamble’s prior criminal record or a request to restrict the purpose for which the evidence was received. In State v. Teasley, 9 N.C. App. 477, 176 S.E. 2d 838 (1970), cert. den., appeal dismissed, 277 N.C. 459 (1970), the court stated that Rule 21 of the Rules of Practice in the Supreme Court provides that “where evidence admissible for some purposes, but not for all, is admitted generally, its admission will not be held for error unless the appellant requested at the time of its admission that its purpose be restricted.” (Citations.) Since the evidence was admitted generally this assignment of error is without merit.
By his assignment of error #4, based on exception #6, defendant Gamble contends that with respect to him the court failed to properly instruct the jury as to the elements of the crime of robbery with a firearm. The portion of the charge covered by this exception consists of two paragraphs separated by another paragraph. We agree that the second paragraph excepted to, standing alone, is error as it did not charge obtaining the property by endangering or threatening the life of the victim with a firearm as an element of robbery with a firearm. In the first paragraph covered by the exception,' however, the court fully set forth all elements of the offense; when the charge is considered contextually as a whole we do not think defendant Gamble was prejudiced. The assignment of error is overruled.
We hold that defendants had a fair trial, free from prejudicial error, and the sentences imposed are within the limits allowed by statute.
No error.
Judges Parker and Hedrick concur.