The opinion of the court was delivered by
Harvey, C. J.:This is an original proceeding in mandamus in which plaintiff seeks a writ commanding defendants to construct a viaduct on Central avenue over their railroad tracks, as directed by a city ordinance. The defendants have filed separate answers. Plaintiff has filed a motion to determine in advance of trial questions of law, stated as follows:
(1) Does the motion for the writ state actual facts or grounds sufficient to warrant the issuance of the writ?
(2). Does the alternative writ state facts or grounds sufficient to warrant the issuance of a final writ of mandamus granting any other relief to plaintiff?
(3) Is the city’s ordinance No. 34771 constitutional?
(4) Is section 12-1634, G. S. 1935 (set out here as Appendix “A”), a constitutional enactment by the legislature?
In response to this motion defendants represent that the hearing of the motion be confined to questions 1 and 2, as set forth in plaintiff’s motion, and that other questions, Nos. 3 and 4, present many questions of law and fact which will require evidence for their determination, and do not present questions of law that can be determined in advance of the trial.
Plaintiff’s motion, as defendants sought to limit it, was heard by the court upon briefs and oral argument. The principal argument concerns questions 1 and 2 of the motion, but there is some argument pertaining to questions 3 and 4.
The motion for the writ may be summarized or quoted as follows: The plaintiff is a city of the first class, with more than 90,000 population. The names of the persons composing its governing body are stated, and it was alleged that the governing body has authorized and directed its city attorney to bring this action in the name of the city. It was alleged that the defendant, Union Pacific Railroad Company, is a corporation of the state of Utah, the Kansas City Terminal Railway Company is a corporation of the state of Missouri, and that Guy A. Thompson is trustee of the Missouri Pacific Railroad Company, a corporation, debtor.
“That under the authority of Section 12-1634 of the General Statutes of Kansas for 1935, and not otherwise, the governing body of the City of Kansas City, Kansas, passed Ordinance No. 34771, finding and declaring it to be *577necessary for the convenience, safety and protection of the public that a new viaduct with the approaches thereto be constructed across and over the tracks of the Union Pacific Railroad Company, the Kansas City Terminal Railway Company and the Missouri Pacific Railroad Company, on Central Avenue from Halloek Street, formerly Park Avenue, thence east to a point of connection with an approach to the upper deck of the Central Avenue bridge over the Kansas river with an approach leading from said viaduct to the ground for a connection with the lower deck of said bridge over the Kansas river and with such approaches at the western end of the said viaduct as will afford adequate' connections with the city trafficway system, and directed the defendants above named to commence the construction of said viaduct within 60 days from the time of the passage of said Ordinance No. 34771 and to continue the work of the construction of said viaduct and approaches without unnecessary delay and with adequate working forces until the viaduct is finally completed.”
That the ordinance was passed April 22 and published April 23, 1947. A copy of the ordinance was attached to the motion as Exhibit “A” and made a part thereof and is set out here as Appendix “B.” That on April 25, 1947, defendants were each served with a copy of the ordinance and the service was duly acknowledged; that on December 10, 1947, each of the defendants was served with copies of the preliminary plans for the construction of the Central avenue viaduct, and that such service was acknowledged; that on December 15, 1947, each of the defendants was served with copies of the specifications for the construction of the viaduct, and that the service was acknowledged; that notice to contractors was duly published February 26, 1948, in the official city paper, inviting bids for the construction of the viaduct, as provided by the ordinance, the bids to be received by 10 o’clock a. m. on March 16, 1948; that newspaper copies of such notice to contractors was sent by mail to each of the defendants; that bids for the construction of the viaduct were received and opened on March 16, 1948, and one of such bids was within the estimate filed by plaintiff’s city engineer; that the defendants, and each of them, have failed, neglected and refused to construct the Central avenue viaduct, as required of them by the ordinance; that plaintiff has no adequate remedy at law, and its citizens and taxpayers are entitled, as a matter of right under the law, to require defendants to construct the Central avenue viaduct, as provided by the ordinance and to pay the cost thereof, and that the city, its citizens and taxpayers *578will suffer irreparable damage and injury unless the court makes an order directing defendants to proceed at once to construct the viaduct, as required by the ordinance.
The prayer was that the court issue against the defendants a writ of mandamus commanding them, and each of them, to construct the Central avenue viaduct as directed by the ordinance.
The alternative writ contained the pertinent allegations of the motion and commanded defendants to commence the construction of the viaduct, as required by Ordinance No. 34771, and to continue the work without unnecessary delay and with an adequate working force until the same was completed, or to show cause by a date named why that had not been done. Hence, point 2 in the motion before us need not be treated separately from point 1.
Respecting points 3 and 4 of the motion, defendants argue the statute and ordinance relied upon by plaintiff are unconstitutional if construed to require them to construct the viaduct under the facts pleaded in the answer. Counsel for plaintiff contend that the allegations of fact in defendants’ answers are regarded under the law as being denied. The point is not well taken. Under our statute (G. S. 1935, 60-1709), while the writ and answer constitute the pleadings in the case they have the same effect and are to be construed in the same manner as pleadings in a civil action. (See Crans v. Francis, Treas., &c., 24 Kan. 754; State, ex rel., v. Reno County Comm’rs, 158 Kan. 573, 576, 148 P. 2d 1012; Fidelity Life Ass’n v. Hobbs, 161 Kan. 163, 164, 166 P. 2d 1001.) In 55 C. J. S. 520, the rule is thus stated:
"In accordance with, statutory provisions, the relator is not concluded by the return and he may join issue by a reply or other pleading; and, if he fails to reply or traverse, such return may be taken as true.”
To the same effect see 35 Am. Jur., 100, § 359.
The motion before us is not a demurrer to the answer, neither is it a motion for judgment upon the pleadings. Defendants do not ask to have their allegations of fact regarded as true in all respects. We think it would be unjust to plaintiff to so regard them, and we shall not undertake to predicate the decision upon that view.
In connection with the argument upon point 1, however, defendants’ contention that the ordinance does not conform to the statutory authorization, being a question of legal interpretation, may properly be considered.
We direct our attention to whether the motion for the writ states *579facts sufficient to authorize the issuance of the writ. The statute gives the governing body of the city power to require any railroad company owning or operating any railroad tracks upon or across a public street of the city to construct and keep in repair a viaduct upon the street over the railroad tracks, including approaches to the viaduct, which the city deems and declares by ordinance to be necessary for the convenience, safety and protection of the public. Under this grant of power the city enacted Ordinance No. 34771 here in question. While defendants contend that the ordinance is not justified under certain facts pleaded, evidence pertaining to those facts had not been heard or considered, and we shall assume for the purpose of this decision that the city had authority to enact a valid ordinance for the purpose sought to be -accomplished by Ordinance No. 34771.
The statute provides that when such a viaduct shall be deemed and declared to be necessary the governing body shall provide for the appraising, assessing and determining of damages, if any. Ordinance No. 34771 makes no provision for determining damages. Counsel for plaintiff advise us that no damages will result. Some of the answers pleaded facts indicating damages will result from the building of the viaduct. That is a matter upon which we cannot pass now, since no evidence on that point has been presented.
The statute further provides:
“The width, height and strength of any such viaduct . . . and the approaches thereto, the material to be used therefor, shall be required by the governing body.”
Ordinance No. 34771 does not determine those items, but leaves it to be shown by plans and specifications prepared by an engineering firm employed by the city, to be later approved by the city engineer and the governing body of the city. In this connection the motion for the writ alleges that on December 10,1947, “preliminary plans” for the construction of the viaduct were served upon the defendants, and that on December 15, 1947, defendants were served with copies of the specifications. But nowhere in the motion for the writ is there any statement that completed plans had been made, or that any plans or specifications 'had been approved by the city engineer and the governing body of the city. We deem this omission vital.
The statute provides that—
“When two or more railroad companies own or operate separate lines of track to be crossed by any such viaduct . . . the proportion thereof and *580of the approaches thereto to be constructed by each, and the proportion of cost to be borne by each, shall be determined by the governing body.”
The governing body by the ordinance in question has not determined the proportion of cost to be paid by each of the defendants. The liability of defendants for the cost of the viaduct is several and not joint. This court could not issue a writ directing each qf the defendants what portion of the viaduct it should construct, or what proportion of the total cost it should pay. Appellant argues that can be done after the total cost is ascertained. It is not the amount of cost the statute requires the city to determine, but the proportion of the cost to be borne by each. That could be determined in fractions or percentages.
Defendants contend that the motion for the writ is indefinite as to the procedure which plaintiff plans to follow. Generally speaking, it may be noticed the statute makes provision by which the defendants might be required to construct the viaduct with its approaches. There is a further provision that if they fail or refuse to do so the governing body shall have power to proceed with the construction of the viaduct by contract, or in such other manner as may be provided by ordinance, and assess the cost thereof against the defendants, which cost shall be a legal indebtedness which may be enforced and collected by a suit in any court having jurisdiction, “Or in lieu of enforcing the collection of the costs of said improvement by a suit at law, the city may issue internal improvement bonds of the city as provided by law to pay for said work, and special assessments shall be levied against the property of such railroad company or companies ... to pay said bonds and interest.” In the motion for the writ it was alleged that notice to contractors was published February 26, 1948, inviting bids for the construction of the viaduct and fixing a date when the bids would be received; that bids were received on that date, one of them within the estimate filed by the city engineer. The motion for the writ does not set out a copy of that notice to contractors, but in one of the answers it was alleged that the notice to contractors contained the following:
“Said work provided for in said plans and specifications will be paid for out of the proceeds of internal improvement bonds of the City and special assessments shall be levied against the property of the Union Pacific Railroad Company, the Kansas City Terminal Railway Company and the Missouri Pacific Railroad Company to pay said bonds.”
*581Hence, it appears from the motion for the writ that although plaintiff asked for a writ requiring defendants to construct the viaduct, the city is proceeding to construct the viaduct under a contract using -the alternative method authorized by statute authorizing it to do so, and pay the costs from the proceeds of the general obligation bonds and levy assessments against the railroads to pay the bonds, with interest. We assume the city does not need two viaducts at the same place, hence there is indefiniteness disclosed by the motion for the writ in the plan to be used by the city for the construction of the viaduct.
The purpose of a writ of mandamus, as stated in our statute (G. S. 1935, 60-1701), is “to compel the performance of any act which the law specially enjoins as a duty.”
In National Bank v. Hovey, 48 Kan. 20, 28 Pac. 1090, it was held:
“A peremptory writ of mandamus will only be allowed when the right of the plaintiff thereto is clear.”
In Sharpless v. Buckles, 65 Kan. 838, 70 Pac. 886, it was held:
“The only purpose of a writ of mandamus is to require the person to whom it is issued to perform some act which the law enjoins as a duty.”
And in Burke v. State Board of Canvassers, 152 Kan. 826, 107 P. 2d 773, 132 A. L. R. 356, it was held:
“Before a writ of mandamus may issue against a public officer to compel performance of any act, it must appear the applicant for the writ has the clear legal right to compel the act and that such act is one which the law specifically enjoins as a duty resulting from the office held by the officer sought to be coerced»”
This is in harmony with the general law. (See 34 Am. Jur. 831, 847, 849 ; 38 C. J. 541, 585, 586, 602; and 55 C. J. S. 15 et seq., and cases cited.
In State, ex rel., v. Atchison, T. & S. F. Rly. Co., 125 Kan. 586, 264 Pac. 1056, it was held:
“Where orders of the public service commission are so indefinite arid wanting in precision that the railroad companies cannot ascertain therefrom what is specifically required of them, mandamus will not issue to enforce obedience thereto.”
Citing the case of State v. Mo. Pac. Rly. Co., 33 Kan. 176, 5 Pac. 772, where it was held:
“Where a city of the first class by ordinance orders three railroad companies jointly to construct a viaduct, and the ordinance is vague and indefinite with respect to the dimensions of the viaduct and the materials to be used in its construction, and its construction as ordered by the city would require a *582change of the grade of certain streets of the city; in violation of certain provisions of the statutes, held, that mandamus will not lie to enforce the construction of such viaduct.” (p. S91.)
Here the right of plaintiff to the writ is not clear from the ordinance and the motion for the writ discloses that two vital provisions of the statute; each a condition precedent to the issuance of the writ, have not been complied with. Also the motion for the writ is indefinite as to the plan the city has for constructing the viaduct. The result is that the motion for the writ does not state facts which would authorize or justify the issuance of a peremptory writ, and for that reason the action should be dismissed.
The answers of the defendants raise other questions of law some of which are mingled with questions of fact which have not been determined. In view of our conclusion as above stated there is no. necessity of our discussing any of the other questions raised by the answers and nothing said herein should be construed as indicating a decision upon any of them.
The motion for the writ is dismissed.
APPENDIX “A”
Our statute (G. S. 1935, 12-1634) reads:
“That the governing body of all cities of the first and second class in a county having a population of over 90,000 shaE have the power to regulate the crossings of railway and street railway tracks and provide precautions and prescribe rules regulating the same, and to regulate the running onstreet railways or cars and railway engines and cars in the city, and to prescribe rules relating thereto and to govern the speed thereof; and to make other and further provisions, rules and regulations to prevent fires from engines, and to require all railway companies to erect viaducts over or tunnels under their tracks at the crossings of streets. The governing body shall have power to require any railroad company or companies owning or operating any railroad or street railway track or tracks upon or across any public street or streets of the city to erect, construct, reconstruct, complete and keep in repair any viaduct or viaducts upon or over or tunnels under such street or streets and over or under such tracks, including the approaches of such viaduct, viaducts or tunnels as may be deemed and declared by ordinance to be necessary for the convenience, safety or protection of the pubHc. Whenever any such viaduct shall be deemed and declared by ordinance to be necessary for the convenience, safety or protection of the public, the governing body shall provide for appraising, assessing and determining the damage, if any, which may be caused to any property by reason of the construction of such viaduct and its approaches. The proceedings for such purpose *583shall be the same as provided by law for the purpose of ascertaining and determining damages to property owners by reason of the change in grade of any street, except that such damage shall be paid by such railway company or companies. The amount of damage thus ascertained and awarded shall, upon notice by the city, be promptly paid by the railway company or companies interested, and if any such company shall fail to pay the same within ten days from receipt of notice of the amount thereof, then the amount so awarded shall become a lien in the proportion to the amount each railway company shall pay, if more than one company is concerned, upon the right of way and all property of such railway company, and the collection thereof may be enforced by the city in an action against such railway company or companies so failing to pay. The width, height and strength of any such viaduct or tunnel and the approaches thereto, the material to be used therefor, shall be required by the governing body. When two or more railroad companies own or operate separate lines of track to be crossed by any such viaduct, either upon, above or below the grade, or where any street railway company intersects and crosses the track or tracks of any railroad company, the proportion thereof and of the approaches thereto to be constructed by each, and the proportion of cost to be borne by each, shall be determined by the governing body. It shall be the duty of any railroad company or companies or street railway company, upon being required, as herein provided, to erect, construct, reconstruct or repair any viaduct or tunnel, to proceed, within the time and in the manner required by the governing body to erect, construct or reconstruct or repair the same, and it shall be a misdemeanor for any railroad company or companies or street railway company to fail, neglect or refuse to perform such duty, and upon conviction, any such company or companies or the superintendent or other officer having charge of such railway company or street railway in the district or division where such viaduct or tunnel is to be erected or repaired shall be fined one hundred dollars, and each day such companies or officers shall fail, neglect or refuse to perform such duty shall be deemed and held a separate offense; and in addition to the penalty herein provided, any such company or companies shall be compelled by mandamus or other appropriate proceedings to erect, construct, reconstruct or repair any viaduct or tunnel as may be required by ordinance as herein provided. The governing body shall also have power, whenever any railroad company or companies or street railway companies shall fail, neglect or refuse to erect, construct or reconstruct or repair any viaduct, viaducts or tunnel, after having been required so to do as herein provided, to proceed with the erection, construction, reconstruction or repair of the same by contract, or in such other manner as may be provided by ordinance, and assess the cost thereof against the property of suclí railroad company or companies or street railway company, and such” cost shall be a valid and subsisting lien against such property, and also shall be a legal indebtedness of such company or companies in favor of such city, and may be enforced and collected by suit in any court having jurisdiction. Or in lieu of enforcing the collection of the costs of said improvement by a suit at law, the city may issue internal improvement bonds *584of the city as provided by law to pay for said work, and special assessments shall be levied against the property of such railroad company or companies or street railway as above provided to pay said bonds and inte2’est.”
APPENDIX “B”
Ordinance No. 34771
“An Ordinance finding and declaring it to be necessary for the convenience, safety, and protection of the public that a new viaduct with the approaches thereto be constructed across and over the tracks of the Union Pacific Railroad Company, the Kansas City Terminal Railway Company, and the Missouri Pacific Railroad Company, on Central Avenue from Hallock Street, formerly Park Avenue, thence east to a point of connection with an approach to the upper deck of the Central Avenue bridge over the Kansas river with an approach leading from said viaduct to the ground for a connection with the lower deck of said bridge over the Kansas river and with such approaches at the western end of the said viaduct as will afford adequate connections with the city trafficway system.
“Be It Ordained by the Board of Commissioners of the City of Kansas City, Kansas:
“Section 1. It is hereby found, determined and declared necessary for the convenience, safety and pi’ote'ction of the public that a new viaduct with the approaches thereto be constructed across and over the tracks of the Union Pacific Railroad Company, the Kansas City Terminal Railway Company and the Missouri Pacific Railroad Company on Central Avenue from Hallock Street, formerly Park Avenue, thence east to a point of connection with an approach to the upper deck of the Central Avenue bridge over the Kansas river with an approach leading from said viaduct to the ground for a connection with the lower deck of said bridge over the Kansas river and with such approaches at the western end of said viaduct as will afford adequate connections with the City trafficway system.
“Said viaduct shall be constructed in strict accord with plans and specifications prepared by the engineei'ing firm of Sverdi’up and Parcel, Consulting Engineers, employed by the City. Said plans will show in detail all requirements as to width, height, type and strength of such viaduct and approaches thereto and the materials to be used, which plans and specifications shall have' been approved by the City Engineer and the governing body of the city.
“The costs of constructing said viaduct and the approaches thereto and the connections therewith, shall be paid by the Union Pacific Railroad Company, the Kansas City Tenninal Railway Company and the Missouri Pacific Railroad Company in the proportions to be determined by the Board of Commissioners of the City of Kansas City, Kansas.
“Section 2. That said Union Pacific Raih-oad Company, the Kansas City Terminal Railway Company and the Missouri Pacific Railroad Company shall begin the construction of the said viaduct and approaches thei’eto within 60 days from the date of the passage of this ordinance and the service upon said companies, and each of them, of a copy of the plans and specifications approved and adopted by the Board of Commissioners of Kansas City, Kansas, and shall continue the work of construction of said viaduct and approaches *585without unnecessary delay and with adequate working forces until said viaduct is finally completed.
“Section 3. If the' said Union Pacific Railroad Company, the said Kansas City Terminal Railway Company and the said Missouri Pacific Railroad Company shall fail, neglect or refuse to construct said viaduct and approaches thereto, and fail, neglect or refuse to begin the said work of construction within the time stated in this ordinance, or fail, neglect or refuse to complete said viaduct and approaches as provided for in this ordinance, they and each of them shall be deemed guilty of a misdemeanor and upon conviction shall be fined the sum of One Hundred Dollars ($100.00) each for each day either of said companies or company shall fail, neglect or refuse to perform the duties imposed by this ordinance. Each day the said railway companies shall refuse to comply with the provisions of this ordinance shall be deemed a separate offense.
“Section 4. This ordinance' shall take effect and be in full force from and after its passage and publication in The Kansas City Kansan, the official City paper.”
(Official certification omitted.)