
193 Kan. 314 (1964)
393 P.2d 978
STATE OF KANSAS, Appellee,
v.
GEORGE WILLIAM DAEGELE, Appellant.
No. 43,114
Supreme Court of Kansas.
Opinion filed July 14, 1964.
James W. Paddock, of Lawrence, argued the cause and was on the brief for the appellant.
Ralph M. King, Jr., County Attorney, argued the cause, and William M. Ferguson, Attorney General, and Daniel A. Young, Assistant County Attorney, were with him on the brief for the appellee.
The opinion of the court was delivered by
PRICE, J.:
The defendant, George William Daegele, upon his plea of guilty, was convicted in the district court of Douglas county of the offense of forcible rape (G.S. 1949, 21-424).
Throughout all proceedings in the district court defendant was represented by counsel.
Following imposition of sentence to the state penitentiary defendant, *315 pro se, filed a notice of appeal to this court. The appeal was regularly heard at the November, 1962, session.
On December 8, 1962, the appeal was dismissed by this court for failure to comply with the rules of appellate procedure, and this court's opinion is found at State v. Daegele, 190 Kan. 613, 376 P.2d 807.
Defendant subsequently filed with the Supreme Court of the United States a petition for a writ of certiorari. On October 14, 1963, that court entered a per curiam order, the pertinent portion of which reads:
"The motion for leave to proceed in forma pauperis and the petition for writ of certiorari are granted. The judgment is vacated and the case is remanded to the Supreme Court of Kansas for further consideration in light of Douglas v California, 372 US 353, 9 L ed 2d 811, 83 S Ct 814."
such order being found at 375 U.S. 1, 11 L.ed.2d 44, 84 S Ct. 89.
Pursuant to the foregoing order of the Supreme Court of the United States, this court, on January 14, 1964, reinstated the appeal and issued an order directing the district court of Douglas county to appoint counsel to represent defendant in the appeal so reinstated (see Prefatory Rule 1(f), 191 Kan. XII).
In compliance with such order the district court of Douglas county appointed James W. Paddock, a regularly practicing attorney of that county, to represent defendant on appeal. Mr. Paddock prepared and filed an abstract and brief and orally argued the appeal at the June, 1964, session of this court.
Defendant's first contention concerns his representation by counsel at his preliminary examination.
The record shows that the preliminary examination was held on July 21, 1961, in the county court of Douglas county, at which time the defendant was present in person and represented by Mr. Hale W. Brown, an attorney of Kirkwood, Missouri. It appears that Mr. Brown had been retained by members of defendant's family. No request was made for the appointment of counsel. The state presented its evidence and rested. Defendant offered no evidence. At the conclusion of the hearing defendant was bound over for trial at the November, 1961, term of the district court on the charges of kidnapping in the first degree and forcible rape.
It is argued that under the provisions of G.S. 1949, 7-104, and Rule No. 54 (188 Kan. XXXV), relating to the association of local counsel with out-of-state counsel in any action or proceeding in courts of this state, Mr. Brown, the Missouri attorney, thus had no *316 "standing" to represent defendant at his preliminary examination, absent a local attorney being associated with him, and thus it inferentially is contended that the preliminary examination amounted to a nullity.
There are several reasons why such contention is without merit and cannot be sustained.
In the first place, under the laws of Kansas a preliminary examination is not a "trial" in the ordinary sense of the word. (State v. Badders, 141 Kan. 683, 42 P.2d 943.) The purpose of a preliminary examination for one charged with a felony is to determine whether an offense has been committed and whether there is probable cause for charging a defendant with the commission thereof. The proceeding is not a trial in the sense that one may be found "guilty." A defendant is bound over for trial only where the state establishes that an offense has been committed and that there is probable cause for charging him with its commission  otherwise he is to be discharged. (G.S. 1949, 62-618.) Under the provisions of G.S. 1949, 62-615, a defendant has the right to be assisted by counsel at a preliminary examination, but there is no statute requiring the appointment of counsel in such a proceeding, and it has been held many times that failure to appoint counsel at a preliminary examination is not error. (Fry v. Hudspeth, 165 Kan. 674, 676, 197 P.2d 945; Martin v. Edmondson, 176 Kan. 374, 270 P.2d 791; State v. Crowe, 190 Kan. 658, 378 P.2d 89, and State v. Naillieux, 192 Kan. 809, 391 P.2d 140.) Moreover, the well-established rule is that any so-called alleged "irregularity" pertaining to a preliminary examination is deemed to be waived where a defendant enters a voluntary plea of guilty in the district court. (Cooper v. Hudspeth, 166 Kan. 239, 240, 199 P.2d 803; Foster v. Hudspeth, 170 Kan. 338, 224 P.2d 987 [petition for writ of certiorari dismissed on motion of petitioner, 340 U.S. 940, 95 L. ed 678, 71 S.Ct. 503]; Plasters v. Hoffman, 180 Kan. 559, 560, 305 P.2d 858, and Thomas v. Hand, 184 Kan. 485, 337 P.2d 651.)
Here the defendant was represented at his preliminary examination by counsel retained by his family. He therefore was not "indigent" in the strict sense of the word. And even though he could have been classed as indigent  no request was made for the appointment of counsel. Moreover, even though a request had been made, the law did not require appointment of counsel. And, finally, his voluntary plea of guilty in the district court amounted *317 to a waiver of any claim of irregularity with respect to his preliminary examination.
It next is contended the trial court erred in not making investigation concerning defendant's mental condition prior to accepting his plea of guilty, and our attention is directed to G.S. 1949, 62-1531, which, in material part, provides that whenever any person under indictment or information, and before or during the trial, shall be found by the court or by a commission empaneled for such purpose to be insane and unable to comprehend his position and to make his defense, the court shall forthwith commit him to the state hospital for the dangerous insane for safekeeping and treatment until such person shall recover, at which time he is to be returned to the court and placed on trial upon the indictment or information.
The record shows that prior to the entry of the plea of guilty no question as to defendant's mental condition or as to his ability to comprehend his position and make his defense, was raised. And, with respect to the point that the trial court, on its own motion, should have ordered an inquiry concerning defendant's mental condition, see the recent case of State v. Kelly, 192 Kan. 641, 391 P.2d 123, in which the subject is fully discussed. As to this matter no error has been shown.
And, finally, it is contended the trial court abused its discretion in not granting defendant's application to defer sentence under the provisions of G.S. 1961 Supp. 62-1534, which read:
"That in case of the conviction of any person for any offense against public morals and decency, as relating to crimes pertaining to sex, in which perversion or mental aberration, appears to be or is involved, or where the defendant appears to be mentally ill, the trial judge may, on his own initiative, or on the application of the county attorney, the defendant, or counsel for the defendant or other person acting for the defendant, defer sentence until the report of a mental examination of the defendant can be secured to guide the judge in determining what disposition shall be made of the defendant."
Succeeding sections (G.S. 1961 Supp. 62-1535, 1536 and 1537) provide that the trial judge shall have power to refer such defendant to a state hospital for mental examination and report thereof; that if the report of the examination shows the defendant is so mentally ill or mentally deficient as to make it advisable for the welfare of the defendant or the protection of the community that he be committed to some institution other than the county jail, penitentiary or industrial reformatory, the trial judge shall have *318 power to commit such defendant to any state or county institution provided for the reception, care and treatment of such cases or similar mental cases, and that if, after commitment to any such state or county institution, it appears defendant has been restored mentally he shall then be returned to the court where convicted and be sentenced or paroled as the court deems proper under the circumstances.
The record shows the following:
On January 2, 1962, the case against the defendant came on for trial. Defendant was present in person and by counsel. Defendant withdrew his plea of not guilty of forcible rape and entered a plea of guilty. On motion of the state  the charge of kidnapping in the first degree was dismissed. Counsel for defendant then made application to defer sentence under the provisions of G.S. 1961 Supp. 62-1534, above. The matter was deferred until January 6, at which time counsel for defendant argued the matter at length, calling attention to defendant's previous record of sex offenses involving young girls  including convictions of sodomy and statutory rape. At the conclusion the state, through the county attorney, recognizing that the matter was discretionary with the court, neither supported nor opposed the application for a mental examination.
At the conclusion of the argument the court stated:
"This is a serious crime and requires a serious penalty. The matters which have been called to the Court's attention by the defendant's motion and the State's showing of prior crimes, are a part of the pre-sentence procedure in this state. We have one other pre-sentence procedure which I think the Court will avail itself of before sentencing the defendant in this case, and that is what is known as a pre-sentence investigation. In light of what the Court has heard this morning the court feels that a pre-sentence investigation should be made, and it will be ordered. Sentence will therefore be deferred until January 13, 1962 at 9:30 A.M. which is a week from today.
"The Court will have under advisement for ruling the motion of the defendant for mental examination, and will have under consideration the State's showing of prior conviction, and on January 13, 1962 will either grant the motion for a pre-sentence mental examination or will be prepared to pronounce judgment and sentence. Meanwhile the defendant will be remanded to custody to wait such ruling and judgment as the Court will make on January 13th."
On January 13 the matter again came on or hearing and all parties were present as before. The trial Court summarized the proceedings to date and noted that the pre-sentencing investigation had revealed there were two detainers against defendant, one being *319 from Brown county for first degree kidnapping and forcible rape, and the other being from Missouri for rape. It then announced its conclusion that it was unnecessary that a mental examination of defendant be had in order to guide it in determining what disposition of defendant should be made, and denied the motion for a mental examination. The provisions of the habitual criminal statute (G.S. 1949, 21-107a) were invoked and defendant was sentenced to confinement in the state penitentiary.
It is to be noted that G.S. 1961 Supp. 62-1534, above, provides that under the facts and circumstances mentioned therein the trial court may defer sentence until the report of a mental examination is secured. The procedure is wholly discretionary  and not mandatory. It is clear that under the facts shown the trial court was of the opinion the welfare and protection of the community required that defendant be committed to the penitentiary. On the record presented it may not be said the trial court abused its sound discretion in following the course it did, and defendant's contention with respect to the matter cannot be sustained.
Throughout all proceedings in the district court defendant was represented by able and competent counsel and, as was said in our former decision in this case  it is clear that in every particular his rights were meticulously safeguarded and protected by the trial court and counsel. His appeal has now been presented by able and competent counsel. No error in any respect has been shown, and the judgment is affirmed.
