
185 Ill. App.3d 129 (1989)
540 N.E.2d 1135
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
ZERNIAL BOGAN, Defendant-Appellant.
No. 4-88-0926.
Illinois Appellate Court  Fourth District.
Opinion filed June 28, 1989.
*130 *131 Daniel D. Yuhas and Arden J. Lang, both of State Appellate Defender's Office, of Springfield, for appellant.
Thomas J. Difanis, State's Attorney, of Urbana (Kenneth R. Boyle, Robert J. Biderman, and Gwendolyn W. Klingler, all of State's Attorneys Appellate Prosecutor's Office, of counsel), for the People.
Judgment affirmed.
PRESIDING JUSTICE McCULLOUGH delivered the opinion of the court:
Defendant was indicted January 21, 1988, on two counts, one count of burglary (Ill. Rev. Stat. 1987, ch. 38, par. 19-1), a Class 2 felony, and one count charging theft (Ill. Rev. Stat. 1987, ch. 38, pars. 16-1(a)(1), (e)(1)), a Class A misdemeanor. Pursuant to the terms of a plea agreement, defendant pleaded guilty to the burglary count and the theft count was nol-prossed. On April 13, 1988, the defendant was sentenced to 24 months' intensive probation supervision (IPS). On November 2, 1988, a petition to revoke probation was filed, the probation was subsequently revoked, and the defendant was sentenced to four years' imprisonment with two days' credit for time spent in jail awaiting sentence, but no credit for any time served on probation.
Defendant appeals from the judgment of the circuit court of Champaign County, arguing (1) the burglary statute under which he was originally sentenced is unconstitutionally overbroad because it criminalizes any entry into an enclosed structure when the entry is committed with the intent to commit a felony or theft; (2) the trial court abused its discretion by failing to sentence him to an additional period of probation, conditioned on jail time and long-term residential drug treatment or, alternatively, by not imposing a three-year minimum sentence; and (3) the court erred by failing to award him at least partial credit for time served on probation prior to revocation.
The defendant did not appeal the original sentence of probation pursuant to the plea of guilty to burglary. On appeal after revocation, defendant for the first time argues the burglary statute is unconstitutionally overbroad because the conduct for which he was convicted could have been charged as lesser offenses. Defendant argues since the conduct which constituted the offense could have been charged as *132 misdemeanor theft, misdemeanor retail theft, or felony burglary, the burglary statute is unconstitutionally overbroad in that it permits the prosecutor, in the exercise of his authority, to determine whether to charge a person with an enhanced offense.
 1 The State contends defendant has waived any such challenge to the statute by not raising it in the trial court. Issues not raised in the trial court may generally be deemed waived, and this includes constitutional issues.
"`It is fundamental that the question of the constitutionality of a statute cannot be properly raised for the first time in a court of review, but must have been presented to the trial court and ruled upon by it, and the person challenging its validity must have preserved proper exceptions to such ruling. [Citations.]' People v. Brand, 415 Ill. 329, 337; see also People v. Luckey, 42 Ill.2d 115, Van Meter v. Stout, 45 Ill.2d 7." (People v. Amerman (1971), 50 Ill.2d 196, 197, 279 N.E.2d 353, 354.)
(See also People v. Cregar (1988), 172 Ill. App.3d 807, 826, 526 N.E.2d 1376, 1389 (and cases cited therein); People v. Myers (1989), 181 Ill. App.3d 769, 771.) Generally, of course, an issue which goes to the underlying conviction should be raised by direct appeal from the conviction, in this case entered on April 13, 1988, rather than when sentencing after revocation, which occurred December 19, 1988. (See In re T.E. (1981), 85 Ill.2d 326, 423 N.E.2d 910 (unless order is void).) And, where a conviction is entered on a guilty plea, the issue should be raised to the trial court's attention in a motion to withdraw the plea (107 Ill.2d R. 604). See, e.g., People v. Wilk (1988), 124 Ill.2d 93, 529 N.E.2d 218.
 2 A clear exception to the waiver doctrine exists, however, where the statutory provision under which a defendant is convicted is found unconstitutional (see, e.g., People v. Bryant (1989), 128 Ill.2d 448, 453, (and cases cited therein)), in which case the statute is void ab initio. (See, e.g., People v. James (1986), 148 Ill. App.3d 536, 499 N.E.2d 1036.) In light of our ruling on the merits, we need not decide the waiver issue.
Illinois courts have upheld convictions for burglary based on unauthorized entry into buildings open to the public, where the entry was committed with the purpose to commit a theft. People v. Weaver (1968), 41 Ill.2d 434, 243 N.E.2d 245, cert. denied (1969), 395 U.S. 959, 23 L.Ed.2d 746, 89 S.Ct. 2100.
In People v. Drake (1988), 172 Ill. App.3d 1026, 527 N.E.2d 519, this court upheld a defendant's conviction of burglary and forgery where he took a stolen check to an Eagle food store and tried to cash *133 it. Defendant was convicted of burglary due to his unauthorized entry into the store with intent to commit a forgery. This court stated: "Defendant did not have authority to enter the grocery store to commit a forgery. He was, therefore, properly convicted of burglary." Drake, 172 Ill. App.3d at 1028, 527 N.E.2d at 520.
 3 Contrary to defendant's argument, the burglary statute is not unconstitutional because it allows prosecutors the discretion to choose whether to charge a defendant with burglary, theft, or retail theft. Similar arguments have been rejected by the supreme court as to the death-penalty statute, argued as unconstitutional because it allows prosecutors "unbridled and arbitrary discretion" in choosing whether to seek the death penalty. In that context, the argument has been rejected on several occasions, and the supreme court concluded that statute satisfies constitutional guarantees. (See, e.g., People v. Brisbon (1989), 129 Ill.2d 200, 223.) This concept of prosecutorial discretion is not restricted to the death-penalty cases. In People ex rel. Carey v. Cousins (1979), 77 Ill.2d 531, 539-40, 397 N.E.2d 809, 814, the court stated:
"As the decisions of this court show, the State's Attorney has always enjoyed a wide discretion in both the initiation and the management of criminal litigation. That discretion includes the decision whether to initiate any prosecution at all, as well as to choose which of several charges shall be brought. See People v. Rhodes (1967), 38 Ill.2d 389, 396[, 231 N.E.2d 400, 403]; People v. McCollough (1974), 57 Ill.2d 440[, 313 N.E.2d 462] * * *; People v. Brooks (1976), 65 Ill.2d 343, 349[, 357 N.E.2d 1169, 1172]; People v. Golz (1977), 53 Ill. App.3d 654, 658, 659[, 368 N.E.2d 1069, 1072] * * *; see also Woodard v. Wainwright (5th Cir.1977), 556 F.2d 781, 784, cert. denied (1978), 434 U.S. 1088, 55 L.Ed.2d 794, 98 S.Ct. 1285."
We note that the First District Appellate Court has rejected an argument similar to that posed by the defendant in People v. Crawford (1986), 145 Ill. App.3d 318, 324-26, 495 N.E.2d 1025, 1029-30, and People v. McGee (1987), 165 Ill. App.3d 833, 840-41, 520 N.E.2d 836, 840-41. Both the Crawford court and the McGee court looked to the decision in United States v. Batchelder (1979), 442 U.S. 114, 123-24, 60 L.Ed.2d 755, 764, 99 S.Ct. 2198, 2204, wherein the Court stated:
"[It] has long recognized that when an act violates more than one criminal statute, the Government may prosecute under either so long as it does not discriminate against any class of defendants."
*134 We conclude the same rationale adheres here. Where criminal conduct might be charged under different statutory provisions with differing penalties, a defendant has no constitutional right to compel his prosecution for the lesser, rather than the greater, offense.
Defendant next argues the trial court abused its discretion in sentencing him to four years' imprisonment. Defendant had several prior adult convictions. In Champaign County case No. 84-CF-1584, defendant was convicted of the offense of unlawful possession of a controlled substance and, in 1985, was sentenced to 18 months' probation. In Champaign County case No. 85-CF-824, defendant was convicted of the offense of forgery and, in April 1986, was sentenced to a term of 18 months' probation. Here, a petition to revoke probation was filed, alleging numerous violations. The court found the State had proved by a preponderance of the evidence the curfew violations in paragraph 4, the allegations of paragraph 6 as to failure to perform public service work on May 1 or October 29, and the allegation of paragraph 8 as to failure to keep an appointment with the probation officer on August 31. The court's findings as to these allegations is not an issue in this appeal.
Prior to the sentencing hearing, defendant was evaluated by the Treatment Alternatives to Street Crime Unit (TASC), but could not elect treatment under the Alcoholism and Substance Abuse Act because his probation officer did not consent to the election. (Ill. Rev. Stat. 1987, ch. 111 1/2, par. 6321(e).) At sentencing, defense counsel argued for reimposition of probation under the Unified Code of Corrections (Ill. Rev. Stat. 1987, ch. 38, par. 1001-1-1 et seq.), with conditions including "a sentence of significant incarceration" and that defendant admit himself to long-term residential placement for his drug abuse problem. (See, e.g., Ill. Rev. Stat. 1987, ch. 38, pars. 1005-6-3(d), (b)(4) (permitting as conditions of probation a period of imprisonment of up to six months and treatment for drug addiction, respectively).) The State argued for imposition of the maximum term of imprisonment permitted by statute for burglary, seven years, and pointed out defendant had previously been placed on probation and then on intensive probation supervision, the latter without success. As to the trial court's first sentencing order:
"Intensive probation supervision is used for those criminal defendants found guilty of felonies who meet all of the criteria to be sentenced to the penitentiary. It is a specialized program to provide intensive supervision and services to a limited caseload of high-risk, nonviolent felony offenders. It is important the orders of probation be complied with." People v. Cozad *135 (1987), 158 Ill. App.3d 664, 670, 511 N.E.2d 211, 216.
The court found the record showed defendant had been afforded opportunities for rehabilitation, but failed to comply with even the simplest requirements of probation. The court concluded the defendant's history was one of indifference to any attempt to structure his life toward rehabilitation and that he showed complete disregard for any rules and regulations to that end, including while placed in IPS. The trial judge concluded defendant was not likely to be rehabilitated and a sentence to the penitentiary was the appropriate disposition.
 4 After revoking the probation of a defendant, the trial court may sentence him to any disposition which would have been appropriate for the underlying offense. (Ill. Rev. Stat. 1987, ch. 38, par. 1005-6-4(h).) Although the defendant cannot be sentenced upon revocation for the activity which constituted the probation violation, nevertheless, the defendant's conduct on probation can be utilized by the trial court to assess the defendant's potential for rehabilitation. People v. Young (1985), 138 Ill. App.3d 130, 135, 485 N.E.2d 443, 445; People v. Jones (1988), 172 Ill. App.3d 1048, 1050, 527 N.E.2d 521, 523.
 5, 6 Imposition of sentence is a matter within the purview of the trial court. A reasoned judgment as to the proper sentence to be imposed must be based upon the particular circumstances of each individual case and depends on many factors, including the defendant's credibility, demeanor, general moral character, mentality, social environments, habits, and age. The trial judge, during the course of proceedings, has an opportunity to consider these factors which is superior to that afforded by the cold record on review. Accordingly, the decision of the trial court as to sentence is entitled to great deference and weight. (People v. Perruquet (1977), 68 Ill.2d 149, 154, 368 N.E.2d 882, 884.) A sentence within the statutory range prescribed for the offense will not be disturbed on review absent an abuse of discretion. People v. Cox (1980), 82 Ill.2d 268, 279-80, 412 N.E.2d 541, 547.
 7 Here, the State asked for imposition of the maximum sentence of imprisonment available for the offense of burglary, seven years. The trial court imposed a term of imprisonment one year above the minimum. No abuse of discretion is shown.
 8 Defendant also argues the trial court committed reversible error by failing to award him sentence credit for time spent on probation prior to probation revocation. Here, defendant was placed on IPS on April 13, 1988. The petition to revoke his probation was filed on November 7, 1988, and after hearing on November 18, 1988, the *136 court found the State had proved certain of the alleged violations by a preponderance of the evidence. Section 5-6-4(h) of the Code, pertaining to resentencing after revocation of probation, provides in pertinent part:
"Time served on probation, conditional discharge or supervision shall not be credited by the court against a sentence of imprisonment or periodic imprisonment unless the court orders otherwise." (Ill. Rev. Stat. 1987, ch. 38, par. 1005-6-4(h).)
Under section 5-6-4, it is well recognized that the trial court has broad discretion in choosing to grant or refuse credit for time served on probation. The determination of the trial judge will not be disturbed on appeal absent an abuse of discretion. (See People v. Chumbley (1982), 106 Ill. App.3d 72, 76, 435 N.E.2d 811, 814 (and cases cited therein); People v. Horton (1987), 160 Ill. App.3d 513, 515, 513 N.E.2d 502, 505-06; see also People v. Cozad (1987), 158 Ill. App.3d 664, 511 N.E.2d 211, cert. denied (1988), 485 U.S. 964, 99 L.Ed.2d 432, 108 S.Ct. 1233.) The constraints of liberty imposed under either probation or IPS cannot be equated to the constraints of imprisonment and no abuse of discretion was demonstrated here.
Accordingly, for the reasons herein stated, the judgment of the circuit court of Champaign County is affirmed.
Affirmed.
LUND and GREEN, JJ., concur.
