
202 Cal.App.3d 352 (1988)
248 Cal. Rptr. 320
THE PEOPLE, Plaintiff and Respondent,
v.
JAMES HENRY LASSITER, Defendant and Appellant.
Docket No. B024155.
Court of Appeals of California, Second District, Division Seven.
June 17, 1988.
*353 COUNSEL
Frank O. Bell, Jr., State Public Defender, under appointment by the Court of Appeal, and Richard Lennon, Deputy State Public Defender, for Defendant and Appellant.
*354 John K. Van de Kamp, Attorney General, Steve White, Chief Assistant Attorney General, Paul C. Ament and Joan Comparet, Deputy Attorneys General, for Plaintiff and Respondent.
[Opinion certified for partial publication.[*]]
OPINION
JOHNSON, J.
James Henry Lassiter appeals from a judgment of conviction for one count of first degree burglary (Pen. Code, § 459).[1] The primary issue on appeal is whether the enhancements imposed for two prior burglary convictions in 1977 and 1979 should be stricken. For the reasons set forth below, we affirm the judgment.

STATEMENT OF FACTS AND PROCEEDINGS BELOW
Lassiter was charged by information of one count of residential burglary in violation of section 459. The information further alleged Lassiter had been convicted of a serious felony, to wit, residential burglary, in violation of section 459 in case numbers A021049, A019456, A017846 within the meaning of section 667, subdivision (a). It also alleged he served a separate term in state prison in case number A021049. Thus he did not remain free of prison for five years subsequent to the conclusion of that prison term and did commit an offense resulting in a felony conviction during that time within the meaning of section 667.5, subdivision (b). He was found guilty by jury of first degree burglary and sentenced to four years for violating section 459. Finding the allegations of the prior convictions to be true, the court further imposed five years for each prior burglary conviction pursuant to section 667, subdivision (a), and one year pursuant to section 667.5, subdivision (b) to be served concurrently, for a total of 19 years. Lassiter timely appealed.

I.[*]
.... .... .... .... .... .

II. THE TRIAL COURT DID NOT ERR IN IMPOSING AN ENHANCEMENT FOR THE 1977 PRIOR FELONY CONVICTION.
In 1977 Lassiter was charged with six counts of burglary of a residence (A017846). He pled guilty to three counts of second degree burglary and *355 three counts were dismissed. The trial court denied probation and committed him to the California Youth Authority (CYA) on October 19, 1977. In 1980 he was charged with four counts of residential burglary (A021049). He pled guilty to two counts of first degree burglary and two were dismissed. He was subsequently sentenced to six years on this conviction plus a three-year concurrent sentence for his 1979 conviction (A019456). Lassiter was dishonorably discharged from the Youth Authority on July 24, 1980.
(1a) Relying on section 17, subdivision (c), appellant contends the 1977 conviction does not qualify as a serious felony within the meaning of section 667, subdivision (a) because he was committed to the Youth Authority.[6] Section 17, subdivision (c) states: "When a defendant is committed to the Youth Authority for a crime punishable, in the discretion of the court, by imprisonment in the state prison or by fine or imprisonment in the county jail, the offense shall, upon the discharge of the defendant from the Youth Authority, thereafter be deemed a misdemeanor for all purposes." He claims this section applies even though he was dishonorably discharged.[7] We disagree.
Appellant would have us construe "discharge" in section 17, subdivision (c) literally without regard to whether it was an honorable or dishonorable one. (2) "It is a settled principle of statutory interpretation that language of a statute should not be given a literal meaning if doing so would result in absurd consequences which the Legislature did not intend. [Footnote omitted; citations omitted.]" (Bruce v. Gregory (1967) 65 Cal.2d 666, 673-674 [56 Cal. Rptr. 265, 423 P.2d 193].) Moreover, statutes in pari materia should *356 be read together as constituting one law. (Isobe v. Unemployment Ins. Appeals Bd. (1974) 12 Cal.3d 584, 590-591 [116 Cal. Rptr. 376, 526 P.2d 528], quoting Old Homestead Bakery, Inc. v. Marsh (1925) 75 Cal. App. 247, 258 [242 P. 749]; Shafer v. Registered Pharmacists Union (1940) 16 Cal.2d 379, 383 [106 P.2d 403].) Section 1772, subdivision (a) (Welf. & Inst. Code) states in pertinent part: "Every person honorably discharged from control by the Youthful Offender Parole Board who has not, during the period of control by the authority been placed by the authority in a state prison shall thereafter be released from all penalties and disabilities resulting from the offense or crime for which he or she was committed, ... [italics added]." The Supreme Court has concluded "... [s]ections 1179[8] and 1772 clearly reflect a legislative policy enunciated almost 100 years ago to provide incentives to youthful offenders to work towards honorable dismissal or honorable discharge." (People v. Navarro (1972) 7 Cal.3d 248, 277 [102 Cal. Rptr. 137, 497 P.2d 481].) To conclude that the Legislature intended to allow a defendant who had been dishonorably discharged from the CYA to benefit from that discharge would pervert the intent of a statute such as section 17, subdivision (c) which is grounded in rehabilitative principles. (3) "A statute must be construed in light of the legislative purpose and design [citation omitted]." (Id. at p. 273.) (4) Moreover, the purpose of section 667 is to deter habitual criminal activity and to provide retributive punishment of persons who repeatedly break the law by significantly enhancing their sentences for subsequent convictions. (See People v. Jackson, supra, 37 Cal.3d at p. 833 [main purpose of § 667 is deterrence of recidivism].)
In People v. Jacob (1985) 174 Cal. App.3d 1166, 1168 [220 Cal. Rptr. 520] the court held the trial court did not err in imposing a five-year enhancement for a prior robbery conviction even though that conviction had been expunged after defendant had been honorably discharged from the CYA. That defendant had pled guilty in adult court but received his sentence to the CYA. (Id. at p. 1171.) The Jacob court reasoned the benefits defendant received from his honorable discharge pursuant to sections 1772 and 1779 (Welf. & Inst. Code) did "not include a reduced penalty for subsequent crimes." (Id. at pp. 1171-1172.) We see even less reason to give appellant the benefit of a reduced penalty for subsequent crimes where, as here, his discharge was dishonorable.
(1b) As to applicant's final contention, section 17, subdivision (b)(2) states: "When a crime is punishable, in the discretion of the court, by *357 imprisonment in the state prison or by fine or imprisonment in the county jail, it is a misdemeanor for all purposes under the following circumstances: ... [¶] (2) When the court, upon committing the defendant to the Youth Authority, designates the offense to be a misdemeanor." (Italics added.) Second degree burglary is punishable by imprisonment in the county jail for a period not exceeding one year or in state prison (§ 461, subd. 2). The record does not indicate that the trial court designated the 1977 conviction as a misdemeanor when it committed him to the CYA. Since the trial court did not designate the offense as a misdemeanor, we conclude it is a felony for all purposes.

DISPOSITION
The judgment is affirmed.
Lillie, P.J., and Reese, J.,[**] concurred.
NOTES
[*]   Pursuant to California Rules of Court, rules 976 and 976.1, this opinion is certified for publication with the exception of part I.
[1]  All subsequent statutory citations refer to the Penal Code unless otherwise indicated.
[*]   See footnote, ante, page 352.
[6]  Appellant also contends the 1977 conviction does not qualify as a serious felony under sections 667, subdivision (a) and 1192.7, subdivision (c)(18) because it was for second degree burglary. As we discussed in part I this contention is meritless.

Respondent argues Lassiter was not committed to the CYA within the meaning of section 17, subdivision (c) but rather was only transferred to its custody to serve out his prison term. It relies on People v. Windham (1987) 194 Cal. App.3d 1580, 1598 [240 Cal. Rptr. 378] and footnote 6 which discusses a defendant who was transferred to CYA custody to serve out his prison term contingent upon its acceptance of him (see Welf. & Inst. Code, § 1731.5, subd. (c)). Windham is not applicable to the case at bar because that defendant was statutorily ineligible for CYA commitment pursuant to sections 1192.7, subdivisions (c)(8) and (19) (Pen. Code) and 1732.5 (Welf. & Inst. Code) which were added by Initiative Measure and approved by the people on June 8, 1982. Because appellant was convicted and sentenced in 1977, these sections do not apply to him.
[7]  Respondent contends Lassiter was not discharged from the CYA because he was on parole from the CYA when he was sentenced on other burglaries, hence section 17, subdivision (c) does not apply. Section 4997, subdivision (a) (Cal. Code Regs., tit. 15) states that a dishonorable discharge occurs when "[t]he ward has been committed to any state or federal prison." The record shows Lassiter was dishonorably discharged from the CYA on July 24, 1980, following his commitment to state prison. Alternatively respondent argues because Lassiter was dishonorably discharged from the CYA he should not benefit from section 17, subdivision (c).
[8]  Section 1179, subdivision (a) (Welf. & Inst. Code) states: "All persons honorably discharged from control of the Youthful Offender Parole Board shall thereafter be released from all penalties or disabilities resulting from the offenses for which they were committed, including, but not limited to, any disqualification for any employment or occupational license, or both, created by any other provision of law...."
[**]   Assigned by the Chairperson of the Judicial Council.
