
    TSCHETTER, Appellant, v. HOFER, Respondent.
    (231 N. W. 937.)
    (File No. 7080.
    Opinion filed September 2, 1930.)
    
      
      Jas. R. McGee, of Salem, for Appellant.
    
      H. Van Ruschen, of Salem, and William Glanser, of Bridge-water, for Respondent.
   BROWN, P. J.

To an obviously sufficient complaint on a promissory note defendant demurred on the ground that the complaint did not state facts sufficient to constitute a cause of action.

Plaintiff moved for judgment on the pleadings. The court denied the motion, overruled! the demurrer, and gave defendant ten days in which to answer. Within that time defendant answered, pleading, among other defenses, several counterclaims, which, if proven, would offset the greater part of the note. Plaintiff admitted due service of the answer, and, before taking the present appeal from the denial of the motion for judgment on the pleadings, she served a reply controverting the allegations contained in the counterclaims. Appellant argues that the demurrer presents no issue of law or fact for the court, and brings the right of the appellant within section 2486 of the Revised! Code of 1919. But section 2486 does not give him a right to judgment on the pleadings even if the demurrer be deemed frivolous. The section provides that, if a demurrer be frivolous, upon application for judgment on the pleadings, judgment may be given, but it does not make it imperative on the court or judge to give judgment on the pleadings without allowing the defendant an opportunity to answer. The trial court has a discretion in this matter, and it is generally held that the discretion should be exercised in favor of allowing the defendant to answer rather than in peremptorily ordering judgment against him. 2 Abbott’s Brief on Pleadings, 1250. Furthermore, we think plaintiff in the present case, by admitting service on the answer and serving a reply to the counterclaims contained therein, waived the right to appeal from the order denying judgment on the pleadings. One who answers after his demurrer to a complaint has been overruled thereby waives his right to appeal from the order overruling the demurrer, Pierson v. Minnehaha County, 26 S. D. 462, 128 N. W. 616, Ann. Cas. 1913B, 386; Schwitz v. Thomas, 38 S. D. 180, 160 N. W. 734; and a plaintiff who replies to an answer duly served in an action thereby waives the right to appeal from an order denying his motion ¡for judgment on the pleadings as they existed before either answer or reply were interposed.

The order appealed from is affirmed.

POLLEY, SHERWOOD, CAMPBELL, and BURCH, JJ., concur.  