
15 Cal.2d 161 (1940)
In the Matter of the Petition of FRANK S. CONNOR for a Writ of Habeas Corpus.
Crim. No. 4257. 
Supreme Court of California. In Bank.  
February 14, 1940.
 Frank S. Connor, in pro. per., for Petitioner.
 Earl Warren, Attorney-General, and Everett W. Mattoon, Deputy Attorney- General, for Respondent.
 THE COURT.
 This is a motion by the attorney-general of this state for a diminution of the record and further certification herein.
 By an information filed by the district attorney of Los Angeles County the petitioner was charged in four counts with the robbery of gasoline stations and in a fifth count with the theft of an automobile. He was also charged with prior conviction of robbery, for which he had served a term of imprisonment, and with unlawfully carrying firearms. On February 18, 1932, he was arraigned before the superior court on said charges. He stood mute, pleas of not guilty were entered as to all the charges, and the case was set for trial on March 17, 1932. On the trial before a jury the petitioner was found guilty on all counts of robbery and that they were robbery of the first degree, and was found guilty of the theft of the automobile. He was also found guilty of the prior conviction for robbery for which he had suffered a term of imprisonment. No appeal was taken from the judgment of conviction and the petitioner was delivered to the warden of the state prison at Folsom on April 8, 1932, at which institution he has since been confined. About two years later, on May 31, 1934, the petitioner made a motion in the trial court to vacate the judgment of conviction on the ground that it was indefinite and uncertain in that the term of imprisonment provided in the commitment could not be ascertained. The motion was denied. On appeal the order of denial was affirmed on January 16, 1935. (People v. Connor, 3 Cal.App.2d 642 [40 PaCal.2d 316].) The petitioner's application to have this court hear and determine the appeal after *163 decision by the District Court of Appeal was denied on February 14, 1935. (3 Cal.App.2d 644.)
 On August 21, 1939, the petitioner filed in this court his petition for a writ of habeas corpus wherein he claimed the right to his discharge from the state prison at Folsom because of the alleged invalidity of the judgment of conviction in that his rights under the federal and state Constitutions had been violated, and particularly that he had been denied the assistance of counsel in his defense as guaranteed by those instruments and as also provided by section 987 of the Penal Code of California. In his petition he set forth the dates of his arraignment, trial, sentence and imprisonment as above indicated, and set forth as exhibits a copy of the information; a purported copy of the transcript of the proceedings at the time of his arraignment and plea; a purported copy of the reporter's transcript of the trial proceeding; a copy of the verdict on each count; and a copy of the judgment on each count.
 The consideration of the petition for the issuance of the writ came on regularly before this court in bank on September 11, 1939, and the petition was denied.
 [1] On the consideration of the petition, the record of this court on the petitioner's application for a hearing by this court, after decision by the District Court of Appeal on his appeal reported in 3 Cal.App.2d 642, was taken into account. It was there disclosed that the petitioner had, in a regular proceeding before the trial court, challenged the validity of the judgment he is now attacking; that he made no mention in that proceeding of the ground now relied upon to set aside the judgment. He could have urged the point in that proceeding and no special circumstances were shown why he should have been permitted, contrary to the general rule, to try out his contentions piecemeal. (In re Drew, 188 Cal. 717, 722 [207 Pac 249].) He could also have raised the point on appeal from the judgment of conviction. Not having done so, he may not, as he now attempts, attack the judgment collaterally. (France v. Superior Court, 201 Cal. 122 [255 P. 815, 52 A.L.R. 869]; In re Gutierrez, 1 Cal.App.2d 281 [36 PaCal.2d 712]; In re Northcott, 71 Cal.App. 281 [235 P. 458].) *164
 [2] Furthermore, the function of habeas corpus is to test the jurisdiction of the court to render judgment. It is not limited to the face of the proceeding, but extends to the record of the court below when necessary to determine jurisdiction. (In re Connolly, 16 Cal.App.2d 709, 715 [61 PaCal.2d 490].) There was before us upon a consideration of the petitioner's application on September 11, 1939, a certified copy of the transcript of the proceedings on the arraignment for plea of the petitioner on February 18, 1932. An inspection of that transcript, the authenticity of which could not be disputed, disclosed that the defendant on his arraignment was asked if he had an attorney and he replied: "I don't need any." Through inadvertence the transcript of said proceedings was not ordered filed in the office of the clerk of this court at the time the order of denial of the petition herein was entered on September 11, 1939, and diligent search has failed to locate that particular document. However, a duplicate certified copy of that transcript has since been obtained and should be made a part of the record herein.
 Undoubtedly the record of the proceedings on arraignment, in which the petitioner stated that he did not need a lawyer, was within the contemplation and memory of the trial judge, when during the trial he stated to the petitioner, upon his then request for counsel, "I pointed out to you in the absence of the jury just what your status is so far as that is concerned."
 [3] The right of an accused to the assistance of counsel in his defense is guaranteed by both the federal and state Constitutions. To supplement the requirements of the fundamental law the legislature in 1872 adopted section 987 of the Penal Code, which provides:
 "If the defendant appears for arraignment without counsel, he must be informed by the court that it is his right to have counsel before being arraigned, and must be asked if he desires the aid of counsel. If he desires and is unable to employ counsel, the court must assign counsel to defend him."
 It may be true that the terms of the statute were not literally complied with at the arraignment of the petitioner for plea in the superior court. This was not true upon his arraignment before the magistrate on his preliminary examination, for he was then and there fully advised of his right to *165 counsel and otherwise. From what took place on both occasions, we conclude that there was a substantial compliance with the statute and that the rights of the petitioner were not prejudiced by the form in which he was advised of his rights. When he said that he did not need counsel the court was justified in taking him at his word and was not permitted to force counsel upon him. (Dietz v. State, 149 Wis. 462 [136 N.W. 166, Ann. Cas. 1913C, 732].) His attitude was equivalent to a declination of counsel, the right to which could be waived. (People v. Rocco, 209 Cal. 68 [285 P. 704]; Gatlin v. State, 17 Ga. App. 406 [87 S.E. 151]; State v. Terry, 201 Mo. 697 [100 S.W. 432]; State v. Raney, 63 N. J. L. 363 [43 Atl. 677]; Barnes v. Com., 92 Va. 794 [23 S.E. 784]; State v. Yoes, 67 W. Va. 546 [68 S.E. 181, 140 Am.St.Rep. 978]; State v. Fulco, 138 La. 995 [71 So. 134]; Stokes v. State, 73 Ga. 816; 16 C.J. p. 821.) The petitioner had been a bank clerk. He had been in the toils of the criminal law before, and had served a term after conviction of robbery. It may be assumed that he was not unfamiliar with court proceedings and that there is no injustice to him to apply the rules of waiver to his case in view of his undoubted familiarity with such matters and his attitude in court. A month intervened between his arraignment and his trial and there was no showing that he made any effort during that time to obtain the aid of counsel or of the court in procuring counsel. When he was confronted by a jury and the trial was on, he then for the first time demanded the assistance of counsel. Under these circumstances, the petitioner may not rightly claim that he was not afforded opportunity to obtain counsel to assist him.
 [4] The conclusions of the court at the time of the petition herein was denied on September 11, 1939, were based on the matters then before the court and now sought to be made a part of the record to be certified to the Supreme Court of the United States in pending certiorari proceedings. The additional matters should also be included, in order to correct the misstatements and omissions in the transcript of the proceedings inadequately incorporated in the petition. The motion for diminution should be granted and a supplemental return be certified accordingly.
 It is so ordered. *166
 GIBSON, J.,
 Concurring.
 I concur in the order. Not having been a member of the court at the time of the consideration of the petition for habeas corpus, I cannot join in the recital of what occurred at that time.
