
926 P.2d 830 (1996)
144 Or. App. 263
STATE of Oregon, Respondent,
v.
Christina Ann BONNIN, Appellant.
10-94-05237; CA A86070.
Court of Appeals of Oregon.
Argued and Submitted May 30, 1996.
Decided October 30, 1996.
Alan H. Biedermann, Salem, argued the cause for appellant. With him on the brief was Sally L. Avera, Public Defender.
Douglas F. Zier, Assistant Attorney General, argued the cause for respondent. With him on the brief were Theodore R. Kulongoski, Attorney General, and Virginia L. Linder, Solicitor General.
Before RIGGS, P.J., and LANDAU and HASELTON, JJ.
RIGGS, Presiding Judge.
Defendant appeals from a judgment of conviction on numerous offenses, assigning error to the court's treatment of four of the offenses as misdemeanors rather than violations. We reverse and remand.
Defendant asserts that the trial court erred by entering misdemeanor convictions and sentencing her as a misdemeanant on four counts, on the ground that the underlying charges were for violations. In support of that assertion, defendant argues that the district attorney failed to comply with certain statutory requirements for prosecuting those charges as misdemeanors. The relevant statute, ORS 161.565(2), provides:
"Upon the date scheduled for the first appearance of the defendant upon any misdemeanor charge * * *, the district attorney first shall declare on the record the *831 intention whether or not to treat the offense in the case as a violation. The case shall proceed as a violation unless the district attorney affirmatively states that the case shall proceed as a misdemeanor. If the case proceeds as a violation, the accusatory instrument shall be amended to denominate as a violation the offense in the case, and the offense, for purposes of the case, shall thereafter be treated as a violation subject to a fine as provided in ORS 161.635 for violations."
Defendant first appeared in this case on June 2, 1994, where she was arraigned on a seven-count indictment that had been filed May 31, 1994, charging her with: count 1, robbery in the first degree; count 2, felony hit and run; count 3, assault in the second degree; count 4, reckless driving; count 5, giving false information to a police officer; count 6, forgery in the second degree; and count 7, theft in the second degree.
Before her arraignment, defendant watched a videotaped explanation of her rights, which stated:
"There are different kinds or levels of offenses. From most serious to least serious these levels are: felonies, misdemeanors, violations and infractions. Each one of these levels of offenses has a different possible maximum sentence. The level of the offense you are charged which [sic] is usually typed in on the lower left portion of the document which contains the charges."
The lower left portion of the indictment, which the district attorney delivered to defendant, contained the following:
"ORS 164.415/Class A Felony
ORS 811.705/Class C Felony
ORS 163.175/Class B Felony
ORS 811.140/Class A Misdemeanor
ORS 807.620/Class A Misdemeanor
ORS 165.007/Class A Misdemeanor
ORS 164.045/Class A Misdemeanor."
At arraignment, the court explained to defendant that the first three counts with which she was charged were felonies and that
"[t]he remaining counts [i.e., counts 4 through 7] are class A misdemeanors. They carry a maximum sentence of up to a year in jail each, and a fine of up to $5,000 on each."
The district attorney said nothing on the record during the arraignment. Defendant entered a plea of not guilty to all counts. Subsequently, on July 14, 1994, defendant pled guilty to counts 6 and 7. On July 14 and 15, 1994, the remaining counts were tried to a jury, which acquitted her of count 2 and found her guilty on the remaining counts.
Before sentencing, defendant argued that counts 4 through 7, the counts charged as misdemeanors on the indictment, had to be sentenced as violations, because they were in fact violations, as a result of the district attorney's failure to comply with the requirements of ORS 161.565(2) that would have allowed the state to prosecute those charges as misdemeanors. The trial court rejected that argument and sentenced defendant to various periods of incarceration on counts 4 through 7.
On appeal, defendant assigns error to the sentences imposed on counts 4 through 7, reiterating her argument that the district attorney failed to satisfy the requirements of ORS 161.565(2). Defendant asserts that the district attorney failed to declare on the record at arraignment whether the state intended to proceed with counts 4 through 7 as misdemeanors, and consequently, by operation of the statute, those counts were violations and could not be sentenced as misdemeanors. The state argues that the error was not preserved, and nonetheless, its actions were effective under ORS 161.565(2) to proceed with those counts as misdemeanors.
We first consider whether defendant preserved the error. The state argues that defendant needed to object at arraignment or before trial to preserve the argument that the counts at issue were violations. Defendant counters:
"Because the statute is self-executing * * *, a defendant cannot be required to make an objection or to raise the issue at the time of arraignment. ORS 161.565(2) imposes an affirmative burden on the prosecutor. To require a defendant to object, at the time of arraignment, in order to *832 prevent the automatic effects of ORS 161.565(2), would implicitly relieve the prosecutor of the express obligation created by the statute."
We agree. ORS 161.565(2) is unambiguous. If the district attorney fails to make the required declaration, the case "shall proceed as a violation." (Emphasis supplied.) Consequently, once the prosecutor here failed to make the necessary declaration, counts 4 through 7 became violations in fact, and an objection by defendant at arraignment would have been pointless and immaterial.[1] Defendant raised the error at sentencing, when the court indicated that it intended to enter misdemeanor convictions and impose misdemeanor sentences on those counts. We conclude that that was sufficient to preserve the error.
We turn to the merits of defendant's argument. The Supreme Court explained the operation of ORS 161.565(2) in State v. Thomas, 311 Or. 182, 185, 806 P.2d 689 (1991):
"The idea of treating a crime as a violation is a more recent invention. * * * Normally, a misdemeanor case is to proceed as a charge of a violation instead unless the district attorney, at arraignment, declares on the record that the case shall proceed as a misdemeanor crime. ORS 161.565(2)."
See also State v. Rode, 118 Or.App. 665, 668-69, 848 P.2d 1232 (1993) (describing effect of ORS 161.565(2)). The state does not argue that the statute operates otherwise, nor does it dispute that the district attorney made no verbal statements at arraignment. The state contends that it met the requirements under ORS 161.565(2) necessary to proceed with counts 4 through 7 as misdemeanors nonetheless, because the indictment set out at its foot that those offenses were misdemeanors and the indictment was part of the record at arraignment. We disagree.
In construing a statute, our goal is to discern the intent of the legislature, and the text of the statute in its context is the best evidence of that intent. PGE v. Bureau of Labor and Industries, 317 Or. 606, 610, 859 P.2d 1143 (1993). The text of ORS 161.565(2) clearly indicates the legislative intent with regard to the substantive requirements without which the state cannot prosecute the subject offenses as misdemeanors. Substantively, ORS 161.565(2) requires that:
"the district attorney first shall declare on the record the intention whether or not to treat the offense in the case as a violation. The case shall proceed as a violation unless the district attorney affirmatively states that the case shall proceed as a misdemeanor." (Emphasis supplied.)
In this case, the list at the foot of the indictment was neither a declaration on the record nor an affirmative statement that the case would proceed as a misdemeanor. At most, the list indicated that the offenses charged in counts 4 through 7 were statutorily defined as class A misdemeanors; it did not indicate the manner in which the state intended to proceed with those offenses. In sum, the state failed to make the requisite declaration under ORS 161.565(2).
The effect of that failure is set forth in the statute: "The case shall proceed as a violation[.]" Therefore, we conclude that counts 4 through 7 were violations and that the trial court erred by entering misdemeanor convictions for those counts. Furthermore, because ORS 161.565(2) provides that an offense proceeding as a violation under that section "shall thereafter be treated as a violation subject to a fine as provided in ORS 161.635," we also hold that the trial court erred by imposing sentences on counts 4 through 7 in excess of that authorized by ORS 161.635.
We have considered defendant's other assignments of error and reject them without discussion.
Judgment of conviction on counts 4 through 7 reversed and remanded for entry of a new judgment and for resentencing; otherwise affirmed.
NOTES
[1]  Correspondingly, defendant need not have objected to the court's failure to amend the indictment, as required by ORS 161.565(2), because the counts were violations by operation of the statute regardless of whether the court amended the indictment to that effect.
