delivered the opinion of the coprt.
The appellants brought a suit in the District Court of Arecibo for a division and delivery of property due by inheritance, to rescind certain sales and to cancel certain records. To succeed in the action it was necessary for them to allege and prove that they were the heirs of Miguel Vega. The averment was made in this way: “That on account of all that has been said the Estate of Miguel Vega devolves upon the complainants named in this case and upon- the defendants, Telesfora and Petrona Rodriguez, as daughters of Gregoria Vega; José and Mercedes Rodriguez, descendants of the same lady; Aurelia Vega, daughter of Juan José; and Federico Calaf, heir to the share of Simona Vega. That these and no others aré the only persons interested in the estate of Miguel Vega; and that, with the exception of the wills of Miguel, Simona, and-Petrona Vega, all the other transmissions of heritable rights arose by way of intestate succession, the ‘declaratorias’ of which will be presented in due time to complete the' division of the inheritance which is sought in the ease.”
The defendants demurred to the complaint on two grounds: First, because it did not state a cause of action, and second, because it was unintelligible and ambiguous. 'On *239May 10, 1910, the District Court of Arecibo decided that the words underscored above were very vague and a judge could not tell whether thereby it was meant to imply that applications for “declaratorias” would be made during the pen-dency of the suit or whether it was desired to say that existing “declaratorias” would be presented; that if the former thing were meant the first ground of demurrer, namely, the failure to state a cause of action, would have to be sustained, and in the second case not; that, therefore, on account of the doubt the demurrer would have to be sustained on the second ground, namely, that the complaint was unintelligible and ambiguous. No leave was given to amend and none was sought, and no further steps were taken in the case until July 15, 1910, when some of the defendants made a written motion for judgment setting up among other things that the complainants had taken no steps in the' case since May, 1909, not making any appearance when the demurrer was signed.
The district court accordingly entered up judgment oh July 15, 1910, saying that the law and the facts were in favor of the defendants and dismissing the complaint. The appeal is taken from the judgment, and the principal ground of error alleged is that the judgment should not have been final but merely equivalent to a nonsuit. Another ground of error suggested is that the motion for judgment was not notified to the complainants. It is not urged that the demurrer was improperly sustained.
When a court sustains a demurrer the case is for the moment decided and the winning party is entitled to a judgment, unless the other party is given an opportunity to amend or take some other step. This opportunity may arise by the terms of the law, by the permission or'concession of the court, given voluntarily or at the instance of the losing party, or such opportunity may perhaps arise from some agreement or stipulation of the parties. If none of these things happen the judgment is a necessary consequence of the sustaining of -the demurrer (as a similar judgment would be the necessary *240conclusion of trial on tlie facts). The demurrer informs the opposite party that the facts of his pleading are admitted for the purpose of the decision to be made thereon. In this particular case if the parties at a trial submitted on the complaint alone the judgment would have to be for the defendants, because the court could not determine whether the complainants are the heirs, as alleged. When the complainants failed to appear at the hearing of the demurrer and when they failed to offer to amend, the court and the opposite parties liad more than the usual reason to believe that the complainants did not care to prosecute the case. In reality the defendants in the discretion of the court would have been entitled to a judgment after the court sustained their demurrer. The usual practice is to permit the losing party to amend, and there is a rule of the district court giving the losing party one day, but the court is not bound to grant the leave if the conduct or the pleadings of the losing party give the court the idea that a further prosecution is idle. Under the circumstances of this case we think tlie court committed no error or abuse of discretion in entering a final judgment rather than a judgment of nonsuit.
Similar considerations apply to the question of giving notice to the complainants. The court in its discretion might have ordered such notice, but it is not an indispensable requirement. The motions to which section 315 of the Code of Civil Procedure relate are those on which orders and not judgments are founded, and section 317 provides:
“When a written notice of a motion is required by this code, it must be given, unless a different kind is prescribed, if the hearing is had in the same district in which the action is pending, or the proceeding had, five days before the time appointed for the hearing; otherwise, 10 days. When the notice is served by mail, the number of days before the hearing must be increased one day for every 25 miles of distance between the place of deposit and the place of service, such increase, however, not to exceed in all 30 days; but the court or judge may prescribe a shorter time. Copies of all the moving papers, except records of the court and files in the action, must be served *241witb tbe notice, or with an order to show cause, but no written notice of any motion affecting the pleadings or for judgment, or of any (motion made’during the progress of the trial, shall be required.”
An application or motion for judgment is thus made an exception.
The appellants allege no error in the action of court in. sustaining the demurrer to the amended complaint. They had due opportunity to he heard. They made no application, to the court below for a reconsideration. We find -nothing in. the record to justify a reversal, and the judgment must be affirmed.
Affirmed.
Chief Justice Hernandez and Justice del Toro concurred. Justices MacLeary and Aldrey took no part in the decision of this case.