This is an appeal by the People from an order setting aside Counts I and II of an information charging defendant with violation of Penal Code section 4501.5,1 which at all times pertinent to this appeal provided as follows: "Every person undergoing a sentence of less than life in a state prison of this State who commits a battery upon the person of any individual who is not himself a prisoner shall be guilty of a felony...."2
[1a] Was defendant "undergoing a sentence of less than life in a state prison ..."?
Defendant was committed to the Youth Authority after having been declared a ward of the Juvenile Court of Los Angeles County. Pursuant to such commitment defendant was sent to Deuel Vocational Institution and thereafter, on July 26, 1961, was transferred to the Correctional Training Facility at Soledad. While such an inmate of Soledad it is alleged that defendant, on April 27, 1962, struck one guard with his fist and another guard with a guitar handle. These alleged batteries are the basis of the first two counts of the information, which the court below dismissed pursuant to a motion under section 995. For purposes of this appeal, there is no question that at the time the alleged batteries were committed defendant was being lawfully held in custody in a state prison, and that said batteries, if committed, were perpetrated upon persons who were not prisoners. The trial court set aside these two counts on the ground that at the time of the alleged batteries defendant was not serving a sentence.3
The People's Contentions
The People contend that a person committed to the Youth Authority is a "`person undergoing [a] sentence'" and that when such a person is transferred to the Correctional Training Facility at Soledad he is punishable for violations of section 4501.5. The People also contend that even if a Youth Authority transferee cannot be deemed a "`person undergoing a sentence,'" such a person should still be amenable to punishment under section 4501.5.
Defendant, a person under 21 years of age, was adjudged and declared to be a ward of the Juvenile Court by the Superior Court of Los Angeles County on June 20, 1956, and was ordered committed to the care and custody of the Youth Authority for the time prescribed by section 1769 of the Welfare and Institutions Code.4 While under the custody of the Youth Authority at the Deuel Vocational Institution defendant was transferred by the Authority to the Correctional Training Facility at Soledad pursuant to section 1755.5 of the Welfare and Institutions Code, which provided, in pertinent part, as follows: "[T]he Youth Authority may transfer to and cause to be confined in ... the California State Prison at Soledad ... for general study, diagnosis, and treatment, or any of them, any person over the age of 18 years who is subject to the custody, control, and discipline of the Youth Authority; and the Director of Corrections may receive and keep ... any person so transferred thereto ... with the same powers as if the person had been placed therein or transferred thereto pursuant to the provisions of the Penal Code." Section 1755.5 further provided: "The provisions of part 3 of the Penal Code,5 so far as those provisions may be applicable, apply to persons so transferred to and confined ..., except that, whenever by reason of any law governing the commitment of a person to the Youth Authority or to an institution under the jurisdiction of the Youth Authority the person is deemed not to be a person convicted of a crime, the transfer or placement of the person in ... the California State Prison at Soledad ... shall not affect the status or rights of the person and shall not be deemed to constitute a conviction of a crime. ..." (Italics added.)
The People do not contend that defendant is a person convicted of a crime, or that by reason of his transfer to Soledad he is to be deemed a person convicted of a crime. At the time of the juvenile court proceedings, section 736 of the Welfare and Institutions Code provided: "An order adjudging a person to be a ward of the juvenile court shall not be deemed to be a conviction of crime."6 The People do contend, however, that by virtue of the provisions of section 1755.5 of the Welfare and Institutions Code defendant became subject to section 4501.5 and was, accordingly, a "`person undergoing [a] sentence.'" The People rely on In re Herrera, 23 Cal.2d 206 [143 P.2d 345]; People v. Temple, 203 Cal.App.2d 654 [21 Cal.Rptr. 633], and People v. White, 177 Cal.App.2d 383 [2 Cal.Rptr. 202]. An analysis of each of these cases discloses that they are not applicable to the situation confronting us in the present case.
Herrera is not in point. That case merely involves the right to appeal. There the defendants were committed to the Youth Authority after conviction of the crime of assault with a deadly weapon. On petition for a writ of habeas corpus, they urged that their detention was illegal since they were not "sentenced" and could not, under the applicable statutes, appeal. The Supreme Court held that "This commitment is a judicial determination of the fact of defendant's conviction and a pronouncement of the sentence for the offense ..., and is therefore the court's judgment and sentence of the convict ..., and is appealable." (P. 214; italics added.) The important distinction between Herrera and the instant case is that in the former the minors were prosecuted criminally and convicted of a crime, while in our case defendant was not convicted of a crime but made a ward of the juvenile court.
Temple involves a situation where a minor, who had been convicted of armed robbery, was sent by the Youth Authority to the Correctional Facility at Soledad. While an inmate there he escaped. The question arose whether the escape was a felony or a misdemeanor. If section 1768.7 of the Welfare and Institutions Code were applicable then the offense would only be a misdemeanor. That section provides that one committed to the Youth Authority and who attempts to or escapes from a facility from which he is confined, is guilty of a misdemeanor. The court held, however, that the provisions of section 1755.5 thereof, insofar as it directs that Part 3 of the Penal Code should apply to Youth Authority transferees at Soledad, were controlling, so that the escape was a felony under section 4530, regardless of the fact that the defendant was under the Youth Authority program. The basis of the holding in Temple was that the defendant was a "prisoner" within the meaning of section 4530, which provided that: "Every prisoner confined in a state prison who escapes or attempts to escape therefrom, is punishable by imprisonment in a state prison...."
The Temple case relied upon White. In that case the appellant had been adjudged a psychopathic delinquent pursuant to Welfare and Institutions Code section 7058, and was committed to Mendocino State Hospital. He was later transferred to Atascadero State Hospital, then to the medical facility at Vacaville, and finally, to San Quentin. While incarcerated there he was convicted of violating section 4502, which provided in part as follows: "Every prisoner committed to a State prison who, while at such State prison ... possesses or carries upon his person [any deadly weapon], ... is guilty of a felony...." On appeal it was argued that the appellant was a patient and not a prisoner, and that therefore he could not come under the provisions of section 4502. The reviewing court held that he was "a prisoner" even though criminal proceedings had been suspended, and the appellant was in prison solely by virtue of section 7058 of the Welfare and Institutions Code, which provided for a 90-day period of commitment for observation.7 The holding of the appellate court was that a person in custody at a state prison as the result of due legal process is a prisoner within the meaning of section 4502, the rationale of the case being that "the significance of the word `prisoner' is not the manner of commitment, but rather the fact of a judicial commitment." (P. 385.)
The holding of Temple and White is that a person who is legally confined in a state prison is a "prisoner" whether his confinement results from a criminal conviction or from a commitment stemming from a proceeding of a noncriminal nature. Under the holding of these cases, defendant was a prisoner while an inmate of Soledad. However, the crucial question before us is not whether he was a "prisoner," but whether he was a "person undergoing a sentence...." Temple and White were not called upon to define this phraseology, nor, to our knowledge, are there any other cases directly interpreting this language.
 A "sentence" is the judgment in a criminal action (People v. Perkins, 147 Cal.App.2d 793, 797 [305 P.2d 932]; People v. Tokich, 128 Cal.App.2d 515, 519 [275 P.2d 816]; People v. Carlson, 177 Cal.App.2d 201, 207 [2 Cal.Rptr. 117]); it is the declaration to the defendant of his disposition or punishment once his criminal guilt has been ascertained. (In re Anderson, 34 Cal.App.2d 48, 50 [92 P.2d 1020].) [1b] A minor who has been made a ward of the juvenile court, as we have pointed out above, is not deemed convicted of a crime. Moreover, a transfer from the custody of the Youth Authority to that of the Director of Corrections does not constitute a conviction of a crime, nor does it in any way affect the rights or the status of the person so transferred. (Welf. & Inst. Code, § 1755.5.) It is clear, therefore, that defendant, although an inmate of Soledad, was still a ward of the juvenile court. He was never prosecuted criminally and therefore was never sentenced. Accordingly, while he may be designated a prisoner in the sense that he was in custody as the result of a legal process (see People v. White, supra, pp. 384-385), he was not then undergoing "sentence." It should be noted, moreover, that at the time of defendant's commitment to the Youth Authority the sections of the Welfare and Institutions Code authorizing the custody and control of one decreed a ward of the juvenile court did not use the term "sentence" but spoke in terms of "care," "benefit" and "commitment" (Welf. & Inst. Code, §§ 740, 743), while the Penal Code sections which dealt with punishment for a crime used, as they still do, the word "sentence." (§§ 12-13.)
The People would have us ignore the difference in language between the introductory sentences of the various code sections in part 3 of the Penal Code and interpret section 4501.5 as if it read "prisoner," instead of "person undergoing a sentence of less than life...." This argument may be answered by stating that when the Legislature intended the code sections in part 3 to include a "prisoner" it specifically said so. (See §§ 4502, 4503, 4530, 4531 and 4532.) Yet when the Legislature intended its provisions to apply only to a person "undergoing a sentence" it likewise said so without equivocation. (See §§ 4500, 4501, 4501.5.) A comparison of section 4500, on the one hand, with sections 4501 and 4501.5, on the other, shows a legislative intent to impose a more severe punishment for proscribed assault activity in prisons when the offender is serving a life sentence than when he is serving a sentence of less than life. Again, when the Legislature was dealing with the possession of deadly weapons in state prisons, it specifically made the statute applicable to "[e]very prisoner...." (§ 4502.) Similarly, when it dealt with damage to prisons the Legislature specifically made the statute applicable to "every person...." (§ 4600.) It is apparent that the Legislature intended to make a distinction between a "prisoner" who was serving a sentence and one who was not when it enacted penal provisions applicable to the commission of a battery in a state prison. As to the former, section 4501.5 applied; as to the latter, section 242, applicable to batteries generally, was deemed adequate.  A legislative enactment should be construed in accordance with the ordinary meaning of the language used and it should be assumed that the Legislature knew what it was saying and meant what it said. (Pepper v. Board of Directors, 162 Cal.App.2d 1, 4-5 [327 P.2d 928]; Pacific Gas & E. Co. v. Shasta Dam etc. Dist., 135 Cal.App.2d 463, 468 [287 P.2d 841]; V.R. Dennis Constr. Co. v. City of San Diego, 188 Cal.App.2d 833, 837 [10 Cal.Rptr. 894].) Apropos the legislative intent from the language used, it is significant to note that the subject statute was amended in 1963 to make it now applicable to "[e]very person confined in a state prison...." (Italics added.) Section 4501 underwent the same change as section 4501.5; yet the Legislature, in its wisdom, left section 4500 undisturbed so as to make it specifically applicable only to persons "undergoing a life sentence...."
 Furthermore, even if it could be said that the statute in question is capable of two constructions, we would still be confronted with the rule applicable to the construction of penal statutes that the construction more favorable to the defendant will be adopted. (People v. Smith, 44 Cal.2d 77, 79 [279 P.2d 33]; People v. Ralph, 24 Cal.2d 575, 581 [150 P.2d 401]; People v. Holtzendorff, 177 Cal.App.2d 788, 795 [2 Cal.Rptr. 676].)
The order is affirmed.
Bray, P.J., and Sullivan, J., concurred.