
51 Cal.2d 388 (1958)
In re CHARLES BANDMANN, JR. on Habeas Corpus.
Crim No. 6305. 
Supreme Court of California. In Bank.  
Dec. 23, 1958.
 Ruth Lubbe Young for Petitioner.
 Edmund G. Brown, Attorney General, Clarence A. Linn, Chief Assistant Attorney General, and Raymond M. Momboisse, Deputy Attorney General, for Respondent.
 CARTER, J.
 This is an application for a writ of habeas corpus by Charles Bandmann, Jr., an inmate of San Quentin, who, after a plea of guilty, of attempted abortion, was sentenced to state prison "for the term prescribed by law." In response to such application we issued an order to show cause why a writ of habeas corpus should not be granted.
 Petitioner was committed to prison on February 18, 1957, and has now served 18 months. Petitioner contends that his maximum sentence should have been one year in the county jail.
 The substantive offense of abortion "is punishable by imprisonment in the state prison not less than two nor more than five years" (Pen. Code,  274; emphasis added.)
 Section 664 of the Penal Code provides "[Punishments For Attempts.] Every person who attempts to commit any crime, but fails, or is prevented or intercepted in the perpetration thereof, is punishable, where no provision is made by law for the punishment of such attempts, as follows:"
 "1. [Offense punishable by more than five years in state *391 prison.  [fn. *]] If the offense so attempted is punishable by imprisonment in the state prison for five years, or more  [fn. ] or by imprisonment in a county jail, the person guilty of such attempt is punishable by imprisonment in the state prison, or in a county jail, as the case may be, for a term not exceeding one-half the longest term of imprisonment prescribed upon a conviction of the offense so attempted. ..."
 "2. [Offense punishable by less than five years in state prison.] If the offense so attempted is punishable by imprisonment in the state prison for any term less than five years,  [fn. ] the person guilty of such attempt is punishable by imprisonment in the county jail for not more than one year."
 The only question involved here is whether subdivision 1 or subdivision 2 of section 664 applies when there has been an attempt to commit the crime of abortion. If subdivision 2 applies, petitioner has served in state prison more than the maximum term which, under that subdivision, would be one year in the county jail; if subdivision 1 is applicable then he has served 18 months of a possible 30 months and is properly in the state prison. The solution to the problem lies in the construction of the phrase found in section 274 of the Penal Code where the substantive offense of abortion is stated to be punishable by not [nor] "more than five years." It will be noted that subdivision 1 of section 664 of the Penal Code (Deering) is entitled "Offense punishable by more than five years in state prison." If the body of the subdivision used the same language it would be obvious that petitioner is correct in his contention. This, however, is not the case, since the language used there differs in that the words used there are "for five years, or more." [1] This court held in In re Lee, 177 Cal. 690, 693 [171 P. 958], that "It has uniformly been held that the indeterminate sentence is in legal effect a sentence for the maximum term. It is on this basis that such sentences have been held to be certain and definite, and therefore not void for uncertainty." [2] It follows from this that the maximum sentence for the crime of abortion is five years, and the punishment for an attempt to commit abortion would be two *392 and a half years in the state prison. In People v. Superior Court, 116 Cal.App. 412, 414, 415 [2 P.2d 843], it was held that subdivision 1 of section 664 provided for punishment for an attempt to commit a substantive crime at one-half of the maximum punishment prescribed for the crime itself. (See also Ex parte Hope, 59 Cal. 423.) On the other hand the language used in the title and body of subdivision 2 of section 664 is identical in that if the offense is punishable by "less than five years" or the punishment is "for any term less than five years" the person guilty of an attempt is to be imprisoned in the county jail "for not more than one year."
 [3] This court held in Los Angeles City School Dist. v. Odell, 200 Cal. 637, 641 [254 P. 570], that "The authorities are numerous to the effect that the title of an act may be relied on in ascertaining the intention of the legislature, where the act itself is ambiguous; but the title 'cannot be used for the purpose of restraining or controlling any positive provision of the act.' (Flynn v. Abbott, 16 Cal. 359, 366; Barnes v. Jones, 51 Cal. 303, 306; In the Matter of the Boston M. & M. Co., 51 Cal. 624, 626.) There is no ambiguity in the amendatory act of 1919, and its title may not, therefore, be employed to control the plain provisions thereof." (See also Heron v. Riley, 209 Cal. 507, 510, 511 [289 P. 160].) [4] It is apparent from the body of subdivision 1 of section 664 of the Penal Code that its provisions are unambiguous if the title thereof is disregarded as it must be since it is merely an editorial one. It is plainly stated that if the offense so attempted is punishable by imprisonment in the state prison for five years or more that the person guilty of such an attempt is punishable by imprisonment in the state prison, or in a county jail, as the case may be, for a term not exceeding one-half the longest term of imprisonment prescribed upon a conviction of the offense so attempted. Subdivision 2 of section 664 of the Penal Code makes provision for punishment of those guilty of attempts to commit crimes where the substantive offense is punishable in the state prison "for any term less than five years." From a careful reading of the two sections it is obvious that the Legislature intended that a crime carrying a five year maximum sentence should constitute the dividing line. In other words, if the substantive offense carries a maximum penalty of five years or more, subdivision 1 is applicable; if the substantive offense carries a maximum penalty of less than five years, subdivision 2 is applicable.
 [5] In disregarding the title of subdivision 1 of section *393 664 of the Penal Code, and looking only to the plain provisions found in the body thereof, subdivisions 1 and 2 are consistent and harmonious. [6a] We said in People v. Moroney, 24 Cal.2d 638, 642, 643 [150 P.2d 888], that "the cardinal rule of statutory construction" was that " 'a statute must be read and considered as a whole, in order that the true legislative intention may be determined. All the parts of a statute must be construed together, and harmonized, so far as it is possible to do so without doing violence to the language or to the spirit and purpose of the act, so that the statute may stand in its entirety. For the purpose of harmonizing apparently conflicting clauses, each should be read with direct reference to every other which relates to the same subject, and so read, if possible, as to avoid repugnancy.' " [7] We also said that "In cases of conflict between the provisions of the same statute, those susceptible of only one meaning will control those susceptible of two if the statute can thereby be made harmonious." If we were to construe the two subdivisions of section 664 as contended by petitioner, we would have a hiatus at the five year mark since subdivision 1 would then provide for punishment for attempts where the maximum penalty for the substantive offense was more than five years with subdivision 2 providing for punishment for attempts where the maximum penalty for the substantive offense was less than five years. [6b] "The act must be considered and applied in all of its parts, and each section must be reconciled with the others and be made effective if possible." (Wulff-Hansen & Co. v. Silvers, 21 Cal.2d 253, 260 [131 P.2d 373]; and see People v. Trieber, 28 Cal.2d 657, 661 [171 P.2d 1]; In re Petraeus, 12 Cal.2d 579, 583 [86 P.2d 343].)
 Petitioner argues that subdivision 2 of section 664 was held applicable to attempted abortion in People v. Bowlby, 135 Cal.App.2d 519 [287 P.2d 547, 53 A.L.R.2d 1147]. In the Bowlby case the defendant was convicted of abortion and of attempted abortion. He was sentenced to one year in the county jail on the attempted abortion count. Although the court affirmed the judgment of conviction there was no discussion of the point raised here, and the case cannot be considered authority for the proposition urged by petitioner that subdivision 2 of section 664 is applicable to attempted abortion convictions.
 [8] In view of the clear wording found in the body of subdivisions 1 and 2 of section 664 of the Penal Code there is no merit to petitioner's contention that said statute is clearly ambiguous requiring a construction that subdivision *394 2 is applicable to this case and defendant should have received a county jail sentence. While it is true as contended by petitioner that the Index to the 1957 Standard Penal Code of California, published by Hanna Legal Publications, lists felonies punishable by five years or less as governed by subdivision 2 and those punishable by more than five years as governed by subdivision 1, such "Index" is not a part of the statute as it was inserted by the author of the publication and not by the Legislature.
 [9] Petitioner relies on Ex parte Hope, 59 Cal. 423, 424 425, in support of his argument that "nor more than five years" is, in reality, a provision that the penalty is less than five years. In the Hope case the petitioner had been convicted of attempted first degree burglary and was sentenced to serve seven and one-half years which the court noted was "one half of the longest term of imprisonment prescribed for a conviction of the offense so attempted." Petitioner there contended that subdivision 2 of section 664 of the Penal Code was applicable. This court denied his application for a writ of habeas corpus and, after quoting both subdivisions of section 664, stated: "In making this enactment the Legislature was obviously classifying the punishment to be imposed on those convicted of attempts to commit certain crimes. The first class (provided for in Subdivision 1) embraces those cases where the offense attempted is punishable in the State prison for five years, or more, or by imprisonment in a county jail, and the second class (provided for in Subdivision 2) embraces those cases where the offense attempted is punishable by imprisonment in the State Prison for any term less than five years. In effect, as we construe the statute, the Legislature has said that (in the absence of another express provision) every person who is convicted of an attempt to commit an offense, which offense when completed is punishable by imprisonment in the State Prison for a term less than five years, but which can not exceed or extend to that period, is punishable by imprisonment in the county jail for not more than one year; and that every person who is convicted of an attempt to commit an offense, which offense when completed is punishable by imprisonment in the State Prison for five years, or more, is punishable by imprisonment in the State Prison for a term not exceeding one half the longest term of imprisonment prescribed upon a conviction of the offense so attempted." (Emphasis added.) Petitioner, of course, relies on the italicized words as authority for his proposition that the term prescribed *395 for the substantive offense of abortion which is "nor more than five years" really means that the term cannot extend to five years. The court continued, in the Hope case, as follows: "It results that the case of petitioner comes within the provisions of Subdivision 1 of Section 664; for he was convicted of an attempt to commit burglary of the first degree, and burglary of the first degree is punishable by imprisonment in the State Prison for a term which may extend to 15 years. Burglary of the second degree is punishable by imprisonment in the State Prison for not more than five years. The Legislature evidently deemed the one a more heinous crime than the other, for the reason, doubtless, that one is committed in the night-time and the other in the daytime. And since, in fixing the maximum punishment of the completed offense, the Legislature has prescribed three times as much in the one case as in the other, it is unreasonable to suppose that it intended to prescribe the same punishment for an attempt to commit the one as for an attempt to commit the other, which would be the result of the construction contended for by the petitioner. At all events, the language employed does not, in our opinion, admit of that construction." Inasmuch as the petitioner in the Hope case had been convicted of attempted burglary in the first degree any statement there made concerning the punishment for attempted second degree burglary is dictum and is hereby disapproved.
 [10] Petitioner also relies on In re Bellis, 75 Cal.App. 146, 147 [241 P. 910]. The petitioner there was found guilty of attempted second degree burglary. The court, after noting that burglary in the first degree was punishable by not less than five years and that second degree burglary was punishable by not less than one nor more than 15 years, held: "An indeterminate sentence is in legal effect a sentence for the maximum term. (In re Lee, 177 Cal. 690 [171 P. 958].) The crime of which petitioner pleaded guilty being punishable for not less than one nor more than 15 years, one-half of the longest term is greater than five years and the crime is, therefore, punishable by imprisonment in the state prison." Petitioner's argument that the Bellis case means that the measuring stick is one-half of the maximum sentence for the substantive crime for the purpose of applying the provisions of section 664 is, obviously, without merit. The provisions of section 664 are very clearly to the effect that it is the maximum term of the substantive offense which is the guide in *396 determining the punishment for an attempt to commit the substantive offense. Any intimation to the contrary in the Bellis case is hereby disapproved. People v. Snow, 123 Cal.App. 33, 35 [10 P.2d 767], which quotes the italicized language in the Bellis case, is disapproved also in that it conveys the inference that one-half of the maximum sentence for the substantive offense is the guide in determining the applicability of section 664 of the Penal Code. It should be here noted that these cases correctly applied the law to the facts there involved and the statements which we here disapprove were clearly dictum and had no bearing on the result reached in those cases.
 [11] Petitioner also contends that he has been denied due process of law and the equal protection of the laws because of the "vagueness" of the provisions of section 664 of the Penal Code. When the two subdivisions are considered and construed together, as we have done here, it is obvious that the language used is neither vague nor ambiguous. [12] Furthermore, even if the section has been misconstrued and misapplied in the past due to the misleading editorial title (see footnote, ante, page 391), petitioner cannot complain of an error which did not affect him and where the section was properly applied as to him.
 [13] Petitioner contends that he was improperly sentenced to prison under section 274 of the Penal Code (abortion) whereas attempted abortion is punishable only under section 664 of the same code. The "Abstract of Judgment," petitioner's Exhibit "A," recites that he was convicted, on his plea of guilty, of "the crime of Felony, Attempted Abortion (a lesser and included offense), ... in violation of section 274 Penal Code. ..." In People v. Berger, 131 Cal.App.2d 127, 129 [280 P.2d 136], it was held that an attempt to commit abortion falls within the provisions of section 664 of the Penal Code. While it does not appear that the judgment is fatally defective, even if it were, it does not mean that petitioner would be entitled to discharge. It was held in In re Fritz, 179 Cal. 415, 416 [177 P. 157], that such offenders "should be returned to the superior court in which they had been convicted, for the imposition of a proper sentence."
 It has been brought to our attention that petitioner was released on parole to Charles R. Bradley, a Sonoma County parole officer on or about August 18, 1958, and that he is no longer in actual physical custody in San Quentin. [14] As a prisoner upon parole, petitioner is constructively a prisoner *397 under sentence in the legal custody and under the control of the Department of Corrections. (In re Marzec, 25 Cal.2d 794, 797 [154 P.2d 873].) [15] Such release does not render this proceeding moot.
 For the reasons hereinabove set forth, the order to show cause heretofore issued is discharged, the writ of habeas corpus is denied and the petitioner remanded.
 Gibson, C.J., Shenk, J., Spence, J., and McComb, J., concurred.
 SCHAUER, J.,
 Dissenting.
 It is the established rule that "When language which is reasonably susceptible of two constructions is used in a penal law ordinarily that construction which is more favorable to the offender will be adopted." (People v. Stuart (1956), 47 Cal.2d 167, 175 [7] [302 P.2d 5, 55 A.L.R.2d 705]; People v. Smith (1955), 44 Cal.2d 77, 79 [2] [279 P.2d 33]; In re Bramble (1947), 31 Cal.2d 43, 51 [6, 7] [187 P.2d 411]; In re McVickers (1946), 29 Cal.2d 264, 278 [176 P.2d 40]; People v. Valentine (1946), 28 Cal.2d 121, 143 [20] [169 P.2d 1]; People v. Ralph (1944), 24 Cal.2d 575, 581 [2] [150 P.2d 401].) As further declared in People v. Ralph (1944), supra, "criminal statutes will not be built up 'by judicial grafting upon legislation. ... [I]t is also true that the defendant is entitled to the benefit of every reasonable doubt, whether it arise out of a question of fact, or as to the true interpretation of words or the construction of language used in a statute.' [Citations.]"
 Applying these principles in this case, any ambiguity in the statute here involved should be resolved in petitioner's favor, and the holding should be that he has already served the full maximum term for his offense of attempted abortion.
 So far as here material the pertinent statute, section 664 of the Penal Code, provides (subdivision 1) one punishment where the offense attempted "is punishable by imprisonment in the state prison for five years, or more," and (subdivision 2) a substantially lesser punishment for the attempt where the offense attempted "is punishable by imprisonment in the state prison for any term less than five years."  [fn. 1] (Italics added.) It seems to me that the legislative intent, as defined by the language used, thus places the turning point on the *398 maximum and the minimum terms which may be imposed as punishment for the offense attempted. In other words, the distinction intended is based on the potentials of punishment as between two classes of crimes; i.e., one class having a minimum of five years' imprisonment and the other class having a maximum of five years. (Cf. Ex parte Hope (1881), 59 Cal. 423.)
 This view, I think, gives rational effect to the differentiation expressed in the statute, and also follows the rule of construction in favor of the accused. The offense here attempted1 obviously "is punishable by imprisonment in the state prison for any [some] term less than five years," but it is not punishable "for five years, or more." (Italics added.) That is, it is not punishable for some or any term which is of more than five years' duration. Thus the attempt to commit the offense plainly does not fall within the class of attempts which carry the more severe penalty that results where the offense attempted is punishable by imprisonment for more than five years.
 It follows that the crime to which petitioner pleaded guilty (attempted abortion) does fall within the class which bears the lesser punishment of "imprisonment in the county jail for not more than one year" (Pen. Code,  664, subd. 2), and that because petitioner has already served more than one year's imprisonment petitioner, and not the writ, should be discharged.  [fn. 2]
 Traynor, J., concurred.
NOTES
[fn. *]  *. Although the effect of this title will be discussed herein, it is interesting to note that as quoted here it is found in Deering's Penal Code. In West's Annotated Penal Code the title is "Offense Punishable by Five Years or More." In Stats. 1953, when the section was amended, chapter 713, section 1, page 1983, no title is set forth for any of the subdivisions of section 664 of the Penal Code.
[fn. ]  . This emphasis added.
[fn. ]  . This emphasis added.
[fn. 1]  1. Abortion, the offense here attempted, "is punishable by imprisonment in the state prison not less than two nor more than five years." (Pen. Code,  274.)
[fn. 2]  2. Penal Code, section 2900.1: "Where a defendant has served any portion of his sentence under commitment based upon a judgment which judgment is subsequently declared invalid or which is modified during the term of imprisonment, such time shall be credited upon any subsequent sentence he may receive upon a new commitment for the same criminal act or acts."
