When the defendant is acquitted on the merits, the defendant is acquitted of the same crime, notwithstanding any defect in form or substance in the charge, information, or complaint on which the trial was had.
When an act charged as a crime is within the jurisdiction of the United States, another state, or a territory, as well as of this state, a conviction or acquittal in the former is a bar to the prosecution for it in this state.
If the defendant is acquitted on the ground of a variance between the charge and the proof, or the charge is dismissed upon an objection to its form or substance, or discharged for want of prosecution, without a judgment of acquittal or in bar of another prosecution, it is not an acquittal of the crime and does not bar a subsequent prosecution for the same crime.
When the defendant is convicted or acquitted of a crime consisting of different degrees, the conviction or acquittal is a bar to another prosecution for the crime charged in the former or for any inferior degree of that crime, or for an attempt to commit that crime, or for an offense necessarily included in the crime of which the defendant might have been convicted under the information, indictment, or complaint.
It is an acquittal of the defendant discharged and a bar to another prosecution for the same crime when two or more persons are charged in the same indictment, and the court dismisses the indictment against a defendant
(1) before that defendant has begun to present a defense and on the application of the prosecuting attorney so that the defendant may be a witness for the state; or
(2) before the evidence is closed and on the application of another defendant on trial so that the discharged defendant may be a witness for a codefendant, and when, in the opinion of the court, there is not sufficient evidence to require the discharged defendant to present a defense.
(a) It is a bar to another prosecution for the same crime if the crime is a misdemeanor, but it is not a bar if the crime charged is a felony when a person is
(1) held to answer to the grand jury and the court dismisses the charge before the case is presented to the grand jury upon the motion of the prosecuting attorney;
(2) held to answer to the grand jury and the court dismisses the charge because the indictment is not found against the person at the next session of the grand jury; or
(3) indicted for a crime and the indictment is dismissed because the trial is not held within a reasonable period of time, there is not good cause shown for the delay, and the delay was not upon the application of the defendant or with the defendant's consent.
(b) Unless the court directs a judgment of acquittal to be entered, it is not a bar to another action for the same crime if the court orders an indictment to be discharged because the prosecuting attorney is not prepared to go to trial when the indictment is called for trial and does not show sufficient cause for postponing the trial.