
266 N.W.2d 109 (1978)
STATE of South Dakota, Plaintiff and Respondent,
v.
Dale Martin LOHNES, Defendant and Appellant.
Nos. 11926, 12090.
Supreme Court of South Dakota.
Argued February 17, 1978.
Decided May 18, 1978.
*111 Peter H. Lieberman, Asst. Atty. Gen., Pierre, for plaintiff and respondent; William J. Janklow, Atty. Gen., Pierre, on brief.
Ronald E. Brodowicz, Rapid City, for defendant and appellant.
CHRISTENSEN, Circuit Judge.
The appellant presents three questions for review on this appeal following the revocation of an order committing him to the state training school under SDCL 26-11-5 and the subsequent imposition of sentence to the penitentiary.
This case, but not the issues involved herein, was before this court in People In Interest of D. M. L., 1977, S.D., 254 N.W.2d 457, in which the court upheld the transfer of the appellant herein from juvenile court to the circuit court.
At arraignment in circuit court, the appellant waived his right to a jury trial. Thereafter, the appellant was tried and was found guilty of count one: assault with a dangerous weapon without the intent to kill, and count two: attempted rape. The court deferred sentencing until April 16, 1976, at which time the appellant presented mitigating evidence through three of his witnesses. The sentencing was postponed until April 19, 1976, when the court in disposition stated:
"... it appearing to the satisfaction of the Court that the ends of justice and the best interests of the public will be served and the defendant is a proper subject therefore; it is hereby Ordered that Judgment of guilt not be entered and that the imposition of sentence herein be suspended pursuant to § 25-11-5 [26-11-5] and that the defendant be placed in the State Training School ..., and be committed to the custody of the Superintendent thereof; and it is further Ordered that ... [he] not be released from said facility on parole or otherwise, that he remain under the jurisdiction of the Circuit Court, Seventh Judicial Circuit; and it is further Ordered that upon... reaching his majority or upon completion of his training, that he be returned to this Court for sentencing...."
Superintendent Green of the State Training School by letter reported to the court that the appellant had run away from the school on two occasions and expressed concern for the safety of the community.
The appellant was returned to the circuit court and a preliminary hearing was held on September 28, 1976, at which time, as he had been in the past, he was represented by the public defender's office. At the close of the hearing, the court found probable cause to hold the appellant for a revocation hearing. The appellant's attorney requested ten days to prepare for the revocation hearing because he had other cases and appeals pending. The trial judge gave him six days to prepare and stated that ten days would be too long to wait because persons of the appellant's age who are in jail deserve preference over appeals. At the hearing on October 5, 1976, defense counsel moved for a continuance again, both prior to the commencement of the hearing of testimony and at the conclusion of the state's case. Both motions were denied. The court found that the appellant had violated the terms and provisions of his order of commitment and revoked its order of commitment. The court then sentenced the appellant to serve five years in the South Dakota State Penitentiary on his conviction of attempted rape and to serve three years on his conviction of assault with a dangerous weapon without intent to kill. The court ordered that the sentences be served concurrently and that the appellant be given credit for time served in the amount of 112 days.
As previously indicated, the appellant's grounds for appeal may be divided into three general areas.
The first area is whether the trial court had jurisdiction to revoke "probation" under SDCL 26-11-5.
*112 SDCL 26-11-5, insofar as pertinent here, provides:
"When a boy ... under the age of eighteen years shall in any circuit court be found guilty of any crime excepting murder, the court may, if in its opinion the accused is a proper subject therefore, instead of entering judgment cause an order to be entered that such boy ... be sent to the state training school...." (emphasis supplied)
The wording of this statute is similar to SDCL 23-57-4 and SDCL XX-XX-XXX (repealed by SL 1976, ch. 158, § 42-43) which are commonly referred to as deferred judgment or suspended imposition of sentence statutes. Under each of these statutes, no judgment of guilt is entered and the defendant is either placed on probation under certain terms, conditions or provisions or, as in this case, sent to the State Training School. If the terms of the order of the court are satisfactorily completed or the best interest of the public as well as the defendant are met, the court may, in its discretion, discharge the defendant and dismiss the charge. The court does not lose its jurisdiction of the defendant under any of the above statutes.
The appellant argues that SDCL 24-9-14 is applicable and that because the Board of Charities and Corrections made no finding that the appellant was unruly or incorrigible or that his "presence ... [was] manifestly and persistently injurious to the welfare of the school" and entered no subsequent order returning him to the court, the court is without jurisdiction. Superintendent Green testified: That the appellant ran away on two occasions; that his behavior was satisfactory but that he was lazy in attempting to improve himself; that the psychological evaluation showed him to be dangerous under certain circumstances; and that, in his opinion, the State Training School was not a secure enough facility to hold and treat the appellant over a long period of time. SDCL 24-9-14 gives the Board of Charities and Corrections the power and authority to order the removal of a child if that child is unruly, incorrigible or injurious to the welfare of the rest of the student body and does not affect the jurisdiction of the court. The Board must be concerned with the welfare of other students entrusted to their charge. Requiring an order of the Board to remove a child from the State Training School would interfere with the court's jurisdiction over the appellant and its ability to "protect society and improve chances of rehabilitation." Morrissey v. Brewer, 1972, 408 U.S. 471, 480, 92 S.Ct. 2593, 2599, 33 L.Ed.2d 484, 493. The court, as long as it retains jurisdiction, has the authority to remove the child by complying with the requirements of due process.
The second ground is whether the appellant received due process in the revocation proceedings.
Under Morrissey v. Brewer, supra, and Gagnon v. Scarpelli, 1973, 411 U.S. 778, 93 S.Ct. 1756, 36 L.Ed.2d 656, a probationer is entitled to a two-step due process proceeding before his probation may be revoked. The first stepa probable cause hearing to determine if there are reasonable grounds to believe that probation violations have occurred and to hold him for further hearingis not involved here. The appellant does not contest the fact that he escaped twice and where violations are admitted, no probable cause hearing is necessary. Morrissey v. Brewer, supra, 408 U.S. at 489, 92 S.Ct. at 2609, 33 L.Ed.2d at 499. Appellant raises no questions about the propriety of the hearing he received.
The appellant complains that he was denied the right to present mitigating evidence by the court's refusal to grant him a continuance. It is the law that the granting of a continuance is within the discretion of the trial court, Farmers and Merchants State Bank v. Mann, 1973, 87 S.D. 90, 203 N.W.2d 173, which will not be reversed except upon clear abuse of discretion. State v. Pickering, 1976, S.D., 245 N.W.2d 634. Moreover, SDCL 15-11-7 requires that an affidavit be filed to support a motion for continuance on account of the absence of a witness. No such affidavit was filed in this case. Furthermore, the court found the *113 witness' testimony not relevant in view of the fact that his testimony was not mitigating in nature; nor was the testimony of such witness material to the case. See State v. Davies, 1914, 33 S.D. 243, 145 N.W. 719, 720; State v. Sonnenschein, 1916, 37 S.D. 139, 156 N.W. 906, 908-909; State v. Johnson, 1955, 76 S.D. 37, 71 N.W.2d 733, 735; State v. O'Connor, 1969, 84 S.D. 449, 173 N.W.2d 48, 49; State v. Dowling, 1973, 87 S.D. 532, 211 N.W.2d 572, 573; State v. Barcley, 1975, 88 S.D. 584, 225 N.W.2d 875, 878.
The appellant also alleges error in the court's refusal to appoint a psychiatrist so as to enable the court to consider the "most advantageous rehabilitation program" for the appellant. In this connection, the appellant had undergone a psychiatric evaluation some months earlier and the court had the benefit of the testimony of the psychiatrist and other witness given somewhat over five months prior to the day of sentencing. State v. Sahlie, 1976, S.D., 245 N.W.2d 476, 480, sets forth the guidelines for determining when court-appointed experts are essential to the defense. The court in this case found that a court-appointed expert was not needed or necessary and that his testimony would be cumulative because of the prior hearings before the court.
Morrissey v. Brewer, supra, 408 U.S. 471, at 489, 92 S.Ct. 2593, at 2604, at 33 L.Ed.2d 484, 499, sets forth the minimum requirements of due process for revocation hearings. They are:
"(a) written notice of the claimed violations...; (b) disclosure to the parolee of evidence against him; (c) opportunity to be heard in person and to present witnesses and documentary evidence; (d) the right to confront and cross-examine adverse witnesses (unless the hearing officer specifically finds good cause for not allowing confrontation); (e) a `neutral and detached' hearing body...; and (f) a written statement by the factfinders as to the evidence relied on and reasons for revoking parole."
The court concluded that "[i]t is a narrow inquiry; the process should be flexible enough to consider evidence including letters, affidavits, and other material that would not be admissible in an adversary criminal trial." The Morrissey and Scarpelli cases deal with whether the rehabilitation program under which the appellant was being treated is sufficient "to protect society and improve chances of rehabilitation." Consideration of the "most advantageous rehabilitation program" is made by the court at the time of sentencing. See Annotation: Parole or Probation Revocation, 36 L.Ed.2d 1077.
The third area of appeal is whether the appellant was denied constitutional guarantees of equal protection by the court's refusal to grant credit for pre-trial custody and for the time spent at the State Training School.
The trial court found the appellant to be indigent and the appellant's status, as such, did not change throughout the proceedings. At time of sentencing, the court refused to give credit for 49 days which the appellant had spent undergoing psychiatric evaluation at the Human Services Center at Yankton, South Dakota, and for the period of time he had spent at the State Training School. The State concedes that appellant is entitled to credit for all his pre-trial custody which resulted from his indigence. The State's concession is in accord with the recent cases which hold that the Fourteenth Amendment equal protection clause requires that credit be given for all pre-sentence custody which results from indigency. King v. Wyrick, 1975, 516 F.2d 321 (8 Cir.); Klimas v. State, 1977, 75 Wis.2d 244, 249 N.W.2d 285.
The appellant contends that he is entitled to credit for time spent in the State Training School. For support, he relies upon Stapf v. United States, 1966, 125 U.S.App. D.C. 100, 367 F.2d 326; Johnson v. Prast, 7 Cir. 1977, 548 F.2d 699; Griffin v. Illinois, 1956, 351 U.S. 12, 76 S.Ct. 585, 100 L.Ed. 891; Williams v. Illinois, 1970, 399 U.S. 235, 90 S.Ct. 2018, 26 L.Ed.2d 586; Tate v. Short, 1971, 401 U.S. 395, 91 S.Ct. 668, 28 *114 L.Ed.2d 130; North Carolina v. Pearce, 1969, 395 U.S. 711, 89 S.Ct. 2072, 23 L.Ed.2d 656 and Klimas v. State, supra.
The appellant's reliance on these cases is misplaced. All these cases, except for North Carolina v. Pearce, supra, deal with incarceration due solely to indigency. The time appellant spent at the training school, unlike his pre-trial custody, was not a result of his inability to raise bail due to his indigency. Commitment to the State Training School was a condition of his deferred judgment under SDCL 26-11-5. Cases dealing with equal protection of indigents are, therefore, inapplicable to this portion of his custody.
In North Carolina v. Pearce, supra, the trial court had not given credit for time served on a void conviction in sentencing the defendant following his reconviction. The court found this to be a violation of the double jeopardy clause in that it punished the defendant twice for the same crime. The appellant evidently contends that service in the training school followed by a prison term without credit for time spent in the training school is double punishment for the same crime.
Probation is not a constitutional right; it is a matter of favor based on legislative grace. The availability of probation is therefore dependent upon the legislature which may make probation subject to revocation and the imposition of any sentence which could have originally been imposed. Douglas v. Sigler, 8 Cir. 1967, 386 F.2d 684; State v. Elder, 1959, 77 S.D. 540, 95 N.W.2d 592; State v. Long, 1971, 85 S.D. 431, 185 N.W.2d 472.
Time served on probation need not be credited on a sentence imposed after revocation. Gehl v. People, 1967, 161 Colo. 535, 423 P.2d 332; People v. Lacy, 1974, 54 Mich.App. 471, 221 N.W.2d 199. This is true even where one of the conditions of probation includes some form of incarceration. State v. Fuentes, 1976, 26 Ariz.App. 444, 549 P.2d 224, affirmed, 1976, 113 Ariz. 285, 551 P.2d 554; People ex rel. Robinson v. Warden, 1977, 58 A.D.2d 559, 396 N.Y. S.2d 19; People v. Jaynes, 1970, 23 Mich. App. 360, 178 N.W.2d 558.
In Fuentes, supra, the defendant was denied credit on his sentence for time spent in jail as a condition of probation. The court held that no double jeopardy occurred because the jail time and his subsequent prison term were merely different phases of a single legislative punishment scheme. The idea of a "legislative scheme" authorizing jail time as a condition of probation which need not be credited on a subsequent prison term was also relied on in People v. Jaynes, supra. In Robinson, supra, the defendant was put on three years' probation on condition that she commit herself to the drug abuse control commission facility. After spending seven months there, she was released. Later her probation was revoked and she was sentenced to a year in jail with no credit for the time spent in the drug facility. The court held that the time in the drug facility was a condition of her probation and that no double jeopardy resulted when she violated the rules of her probation.
Probationary incarceration is merely one phase of a single legislative punishment scheme. No credit for time served on probation is intended if the defendant incurs punishment under the second phase. This is in accordance with the American Law Institute's Model Penal Code dated July 30, 1962, Article 301.1(3) wherein it states:
"When the Court sentences a person who has been convicted of a felony or misdemeanor to be placed on probation, it may require him to serve a term of imprisonment not exceeding thirty days as an additional condition of its order. The term of imprisonment imposed hereunder shall be treated as part of the term of probation, and in the event of a sentence of imprisonment upon the revocation of probation, the term of imprisonment served hereunder shall not be credited toward service of such subsequent sentence."
The question then becomes what punishment scheme was intended by the South Dakota Legislature.
*115 Under the first phase of the scheme, a child who is convicted of a crime may be committed to the training school instead of having judgment entered against him. SDCL 26-11-5. A discharge from the school upon reaching 21 years of age or when he is reformed operates as a release of all charges. SDCL 24-9-17.
Under the second phase of this scheme, the child is returned to the county of conviction for a violation of the order of commitment as in this case or under SDCL 24-9-14. Although the appellant was not returned under SDCL 24-9-14, that statute does indicate the legislative attitude toward credit for the time spent at the school. That statute provides that after the return of a child, proceedings "shall be resumed as if no warrant or order committing him or her to the training school had been made." This language indicates that time spent at the school should be disregarded in subsequent proceedings. Support for this interpretation is found in SDCL 23-57-5.1[*] wherein imprisonment in the county jail may be made a condition of parole, probation or suspension of the sentence. Based upon this language and absent any statute requiring it, credit need not be given for time spent at the State Training School.
The judgment in appeal number 11926 is affirmed. The judgment in appeal number 12090 is affirmed with regard to the revocation of the order of commitment but is remanded with directions that the trial court modify its sentence by giving appellant 49 days credit in addition to that which the court has already credited upon his sentence.
All the Justices concur.
CHRISTENSEN, Circuit Judge, sitting for ZASTROW, Justice, disqualified.
NOTES
[*]  Enacted in 1977.
