A defendant who has appeared may, without answering, demand in writing an assessment of damages, of the amount which the plaintiff is entitled to recover, and thereupon such assessment shall be had or any such amount ascertained in such manner as the court on application may direct, and judgment entered by the clerk for the amount so assessed or ascertained.