
59 Cal.2d 548 (1963)
THE PEOPLE, Plaintiff and Respondent,
v.
BRUCE ALLYN WALLACE, Defendant and Appellant.
Crim. No. 7332. 
Supreme Court of California. In Bank.  
May 9, 1963.
 Harry E. Weiss and Burton Marks for Defendant and Appellant.
 Stanley Mosk, Attorney General, William E. James, Assistant Attorney General, and Louis L. Selby, Deputy Attorney General, for Plaintiff and Respondent.
 PETERS, J.
 Bruce Allyn Wallace and his wife were charged and convicted of a violation of section 11500 of the Health and Safety Code (possession of heroin). The husband was also charged and convicted of a prior misdemeanor conviction under the same section. Because of this prior conviction, the trial court ruled that it had no power to grant the defendant husband probation, and also ruled that it had no power to act under sections 6451 and 6452 of the Penal Code. For that reason it sentenced the defendant husband to the state prison. The husband alone appeals.
 No challenge is made of the sufficiency of the evidence or of the propriety of any ruling on the admission or exclusion of evidence. The contentions are (1) that the trial court erred in holding that, as a matter of law, it could not grant probation, and (2) that the trial court erred in holding, as a matter of law, that it could not consider the possible application of sections 6451 and 6452 of the Penal Code.
 [1] The trial court properly ruled that it was prohibited by law from granting appellant probation.
 Appellant was convicted on June 28, 1961. The application for probation was denied, and the state prison sentence imposed, on December 4, 1961. Prior to September 15, 1961, section 11715.6 of the Health and Safety Code read, in part: "In no case shall any person convicted of violating Sections 11500 ... be granted probation by the trial court, nor shall the execution of the sentence imposed upon such person be suspended by the court, if such person has been previously *550 convicted of any offense described in this division. ..." Thus, prior to September 15, 1961, appellant, having been previously convicted of a violation of section 11500 of the Health and Safety Code, was not eligible for probation. On this latter day there became effective certain amendments and additions to the Health and Safety Code. Section 11715.6 was amended to provide that probation shall not be granted nor shall execution of a sentence imposed be suspended "if such person has been previously convicted of any felony offense described in this division, ..." (Italics added.) At the same time section 11504 of the Health and Safety Code was added. That section provides: "As used in this article 'felony offense,' and offense 'punishable as a felony' refer to an offense for which the law prescribes imprisonment in the state prison as either an alternative or the sole penalty, regardless of the sentence the particular defendant received." Under this definition, the prior misdemeanor sentence, imposed for a violation of section 11500 of the Health and Safety Code, was a "felony conviction," as that term is defined in section 11504. Thus both the old and amended sections prohibited the trial court from granting probation on the second conviction. (People v. Estrada, 211 Cal.App.2d 722, 728 [27 Cal.Rptr. 605].)
 Appellant does not argue seriously to the contrary. He does argue that, by implication, the Legislature repealed section 11715.6 of the Health and Safety Code when it adopted, later in the same session, section 6451 of the Penal Code. That section reads, in part: "Upon conviction of a defendant for any crime in any superior court, if the judge ascertains that the defendant is addicted or by reason of repeated use of narcotics is in imminent danger of becoming addicted to narcotics he shall adjourn the proceedings or suspend the imposition of the sentence and direct the sheriff to file a petition to ascertain if such person is addicted to narcotics or in imminent danger thereof unless in the opinion of the judge the defendant's record and probation report indicate such a pattern of criminality that he does not constitute a fit subject for commitment under this section. ..." The section then provides that if the judge shall find the defendant is a fit subject under it, an order shall be made committing the defendant to the custody of the Director of Corrections.
 [2] The sections are not inconsistent. It is true that both the Health and Safety Code section and the one in the Penal Code deal with narcotic addicts, that is, with persons that *551 are or may become narcotic addicts. But the sections of the Health and Safety Code deal with the subject of probation in a criminal case, and are criminal in nature, while the sections of the Penal Code, starting with section 6450, do not relate to the subject of probation at all, and are civil and not criminal in nature. (In re De La O, ante, p. 128 [28 Cal.Rptr. 489, 378 P.2d 793].) Therefore, they are not inconsistent. The Penal Code section did not repeal by implication the Health and Safety Code section.
 [3] It is next contended that under sections 6451 and 6452 of the Penal Code the court had discretion to act, and that it failed to exercise such discretion by holding, as a matter of law, that it had no power to act because of the prior misdemeanor conviction. This contention is sound.
 The record, reasonably interpreted, shows that the trial court concluded that it had no power to act under section 6451 because of the prior conviction, and so refused to exercise the discretion conferred upon it by that section. It is conceded that, if the trial judge was wrong in this respect, and failed to exercise any discretion, the case should be reversed and remanded to the trial court with instructions to exercise the discretion conferred by the section. (People v. Bradford, 212 Cal.App.2d 403 [28 Cal.Rptr. 115].)
 The record shows the following. Defendant and his wife were found guilty of possession of narcotics by the court sitting without a jury, a jury having been properly waived, on June 28, 1961.proceedings were resumed on November 20, 1961. The court was then very concerned over the impact of the prior misdemeanor conviction. The following discussion between court and counsel took place on that subject.
 "The Court: I have attempted to look into the part about sentencing. You have asked the Court to consider probation. Frankly, I think in view of the prior I don't have any alternative, prison sentence or the possibility of maybe certifying him to treatment under these new provisions here deemed. [Referring to  6451 and 6452.] Granted, I am sympathetic to your argument. ... I just don't feel that I can do other than either sentence him to State Prison required by law or possibly referring him to Department 95 to see if he is a fit subject for treatment under that section."
 "Mr. Rose: [Deputy District Attorney.] I think if he has a narcotic prior you can't send him there. ... It's a new section. Section 6451, I believe. ... Would your Honor look at 6451? *552"
 "The Court: I don't want to preclude any possibilities here. ... I'll be glad of any indication you want to make here. I have used this section on misdemeanor matters but I have not on felony matters, so any information I'm perfectly willing to consider."
 "Mr. Rose: This was the part that I have here, your Honor. Seems to me if a man has a narcotic conviction he is ineligible for that section."
 The case was then continued until December 4, 1961, to permit further consideration of the problem. On that date the following occurred:
 "The Court: Well, I might say here that I have tried to consider this carefully, but I think that I am bound by the law that is set forth by the Legislature, and for that reason I am going to impose the following sentence: The Defendant is sentenced to State Prison for the term prescribed by law, ... I realize the hardship of having been in custody for such a long period of time. The only consolation I can offer is that the Adult Authority may consider this in the final disposition they make, but I think in view of the prior conviction, that I am bound to impose this sentence, and I do so at this time." (Italics added.)
 Thus, it appears that the trial court believed and ruled that there was no alternative to a prison sentence because of the prior misdemeanor conviction. The record shows that the trial judge was sympathetic to appellant and thought the case was a proper one, either for probation, or for consideration under section 6451, but the court felt that it was precluded from acting, as a matter of law, under either procedure, because of the prior conviction. As already pointed out, the court was correct in ruling that the prior conviction precluded probation, but was incorrect in holding that it did not have discretion to act under section 6451. Section 6452 of the Penal Code excludes from the operation of the commitment sections (Pen. Code,  6450-6454) "persons convicted of, or who have been previously convicted of ... any offense set forth [in various parts of the Health and Safety Code including  11500] ... for which the minimum term prescribed by law is more than five years in state prison." (Italics added.) It is not necessary to decide whether the "minimum term" for the prior conviction referred to in this section has reference to the penalty provided for punishment for a violation of section 11500 as of the date of the violation, or as of the time section 6452 became effective, for in either *553 event, under the facts of the instant case, such terms were not ones "for which the minimum term prescribed by law is more than five years" as provided in section 6452.
 At the time of the prior conviction, section 11500 of the Health and Safety Code provided that the punishment for a first offense under the section should be "imprisonment in the county jail for not more than one year, or in the state prison for not more than 10 years." And for a second offense, the minimum punishment was fixed at "not less than two years." As amended in 1961 the section now provides that the punishment for a first offense shall be "imprisonment in the state prison for not less than two years nor more than 10 years." For a second offense the minimum is "five years," not "more than" five years. Thus, as applied to the facts here involved, neither the old or new code section has provided that the punishment for a second offense is one "for which the minimum term prescribed by law is more than five years in state prison." This being so, the court did have discretion to act under section 6451 of the Penal Code. The trial court was in error in ruling that it did not.
 Of course, the trial court is not compelled to act under this section. It has the discretion to refuse to commit under it if it should find that the defendant is not an addict or in danger of becoming one, or because he has such a pattern of criminality that he is not a fit subject for commitment. But the record shows that the trial judge refused to exercise his discretion in the erroneous belief that he had none. Under such circumstances the judgment must be reversed, and the cause remanded not for a new trial, but in order that the trial court may have the opportunity to exercise its discretion under the provisions of section 6451 of the Penal Code. (See People v. Bradford, supra, 212 Cal.App.2d 403.)
 The judgment is reversed and the cause remanded to the trial court for further proceedings in conformity with this decision.
 Gibson, C. J., Traynor, J., Schauer, J., McComb, J., Tobriner, J., and Peek, J., concurred.
