(1) If a demurrer pleaded by an accused person is allowed the judgment shall be that the accused person shall be discharged from the premises set forth in the indictment to which such demurrer is pleaded, and he shall be discharged accordingly.(2) When an accused person demurs only, the judge shall, subject to his power to adjourn the trial, hear and determine the matter forthwith, and if the demurrer is overruled, the accused person shall be called upon to plead to the indictment.(3) When an accused person pleads and demurs together, it shall be in the discretion of the judge whether the plea or the demurrer shall be determined first.(4) Every demurrer shall be in writing, and filed with the clerk of the court at the time it is pleaded, and no joinder in demurrer shall be necessary.