
501 P.2d 85 (1972)
Alex L. PARKS et al., Appellants,
v.
THE BOARD OF COUNTY COMMISSIONERS OF TILLAMOOK COUNTY, State of Oregon, Respondent, Spliid Investment Co., a Co-Partnership Consisting of Oscar A. Spliid, Jr. and Barbara N. Spliid, Intervenor and Cross-Respondent.
Court of Appeals of Oregon, Department 2.
Argued and Submitted May 30, 1972.
Decided September 18, 1972.
*88 Alex L. Parks, Portland, argued the cause and filed the briefs for appellants.
Sidney E. Thwing, Eugene, argued the cause for respondent, intervenor and cross-respondent. With him on the brief were Thwing, Atherly & Butler, Eugene.
Before SCHWAB, C.J., and LANGTRY and THORNTON, JJ.
SCHWAB, Chief Judge.
Petitioners seek writ of mandamus requiring the Board of County Commissioners for Tillamook County to cancel building permits issued for the construction of 11 houses on Block 24, Neskowin, Oregon, and to compel the removal of those houses. Petitioners, owners of land adjoining Block 24, contended that the houses on Block 24 are being constructed in violation of the Tillamook County Zoning Ordinance.
After issuance of an alternative writ addressed to the county commissioners, Spliid Investment Co., the developer constructing the houses in question, filed a motion to intervene, which was granted. Intervenor then filed: (1) a complaint in intervention; (2) a motion to strike certain allegations in the alternative writ; and (3) a demurrer. The circuit court held a consolidated hearing on intervenor's motion to strike and demurrer. At this hearing petitioners orally answered the complaint in intervention. The circuit court sustained the demurrer on the ground that the alternative writ failed to state a cause of action in mandamus, but did not rule on intervenor's motion to strike. Petitioners appeal from the circuit court's ruling on the demurrer.
For purposes of clarifying the facts, it would have been preferable for the circuit court to first rule on intervenor's motion to strike, which we view as being more in the nature of a motion to make more definite and certain. As the record now stands, however, a preliminary problem is to determine the facts properly cognizable in this appeal. Normally in a mandamus case when considering whether a demurrer should have been sustained we look only to the well-pleaded allegations in the alternative writ, which are assumed to be true for purposes of the demurrer. But this approach is complicated here because intervenor filed a complaint which petitioner has orally answered. So we assume it is proper to look also to the allegations in the complaint in intervention which were admitted by the petitioners.
However, both sides in their briefs in this court have gone beyond the written pleadings in stating the facts before us. Moreover, the circuit judge in his opinion sustaining intervenor's demurrer went beyond the facts alleged in the pleadings. Therefore, like the parties and the court below, we look to the allegations in the pleadings and to the other "facts" on which there is no disagreement and which were relied upon by the circuit judge.
The houses in question are being constructed on Block 24 in Neskowin. Before any zoning ordinances were applicable to it, Block 24 was platted into 12 lots, four of which were 40 feet by 100 feet and the rest of which were 50 feet by 100 feet. Also, before zoning ordinances were applicable, a structure was built on two (according to the alternative writ) or two and part of a third (according to the circuit judge's opinion) contiguous lots located on Block 24. Until construction began on the houses in question, the remaining lots in Block 24 were vacant.
In 1969, Tillamook County adopted zoning ordinances which classified Block 24 as R-1 (medium density residential). The standards for the R-1 zone required minimum lot areas of 7,500 square feet and *89 minimum lot widths of 75 feet. Thus, all the lots in Block 24 were substandard in both minimum area and minimum width when the property was zoned.
In January 1971, intervenor obtained an option to purchase Block 24, and shortly thereafter applied to the Tillamook County Planning Commission for a variance and/or conditional use permit to construct duplex apartments thereon. A public hearing was held on intervenor's application. The pleadings are contradictory as to whether the application was denied (as alleged in the alternative writ), or withdrawn (as alleged in the complaint in intervention and admitted by petitioners) at the hearing.
Thereafter, intervenor initiated the development plan for Block 24 here challenged. Their complaint in intervention describes their activities as follows:
"* * *
"V
"That thereafter and on or about the first day of February, 1971, Oscar A. Spliid, Jr. submitted by letter to Richard Smith, Tillamook County Planning Consultant, Tillamook, Oregon a general plan for the construction of eleven single family dwelling units upon lots 1 through 12, Block 24, Neskowin, Tillamook County, Oregon.
"VI
"* * * [T]he intervenor's general plan for the development of the said real property was approved and intervenor thereafter exercised his option to purchase said real property.
"VII
"After the general plan for development of the property was approved by the respondents' duly designated officials, intervenor caused working drawings and specifications of the development to be prepared showing, among other things, the exact location of each single family dwelling on said real property, which detailed working drawings and specifications were submitted to respondents' duly designated officials.
"VIII
"That thereafter Al Moore, intervenor's duly authorized agent, applied to the Tillamook County Building Department for permission to build eleven single family dwelling units upon Block 24, Neskowin, Oregon in accordance with the plans and specifications theretofor submitted to it, and on or about May 21, 1971, May 25, 1971 and May 26, 1971, the respondents by their duly designated officials, John D. Lesch, County Planning for Zoning, Robert A. Sheets, Building Director, and William Maxwell of the Tillamook County Health Department, executed on behalf of the respondent county, building permits to Al Moore authorizing the construction of the eleven single family dwelling units upon Block 24, Neskowin, Oregon.
"IX
"That immediately thereafter the intervenor commenced the construction of the eleven single family dwelling units upon Block 24, Neskowin, Tillamook County, Oregon, in accordance with the plan previously submitted to and approved by the duly authorized representatives of respondent Board of County Commissioners.
"* * *."
All of these allegations were admitted by petitioners.
It is not entirely clear exactly what intervenor submitted to the various Tillamook County officials, or exactly what those officials approved. We gather from the record that it probably was the "plot plan" attached to the alternative writ as Exhibit B, and reproduced below.
*90 
As is apparent from the arrangement of the 11 houses being built by intervenor, the previously existing lot lines in Block 24 have been ignored. Intervenor takes the position this is permissible because all of Block 24 is to be utilized as a condominium development. As we understand intervenor's plans, Block 24 will be occupied by 11 single-family homes in private ownership with all of the grounds and the previously existing structure in common ownership.
The questions meriting discussion are:
(I) Does the alternative writ make a prima facie showing that there has been any violation of the Tillamook County Zoning Ordinance?
(II) Does the alternative writ sufficiently allege that petitioners have a right to the relief demanded?
*91 (III) Does the alternative writ sufficiently allege that the Board of County Commissioners for Tillamook County has the duty and power to perform the acts sought to be enforced?
(IV) If a prior demand is necessary, does the alternative writ sufficiently allege a prior demand on the county commissioners to perform the acts sought to be enforced?

I
It is well established that in a mandamus proceeding the alternative writ must allege facts which establish a prima facie right to the relief demanded. Johnson v. Craddock et al., 228 Or. 308, 365 P.2d 89 (1961). The alternative writ in this case requires county commissioners to: (1) cancel the 11 building permits issued for the homes being constructed by intervenor; and (2) declare those homes to be nuisances and compel their removal pursuant to ORS 215.180 and 215.185. Those statutes provide:
"The location, erection, construction, maintenance, repair, alteration or use of a building or other structure, or the subdivision, other partitioning, or use of land, in violation of an ordinance or regulation authorized by ORS 215.010 to 215.190 shall be deemed a nuisance." ORS 215.180.
"In case a building or other structure is, or is proposed to be, located, constructed, maintained, repaired, altered, or used, or any land is, or is proposed to be, used, in violation of an ordinance or regulation authorized by ORS 215.010 to 215.190, the governing body or district attorney of the county or a person whose interest in real property in the county is or may be affected by the violation, may, in addition to other remedies provided by law, institute injunction, mandamus, abatement, or other appropriate proceedings to prevent, temporarily or permanently enjoin, abate, or remove the unlawful location, construction, maintenance, repair, alteration, or use. When a temporary restraining order is granted in a suit instituted by a person who is not exempt from furnishing bonds or undertakings under ORS 22.010, the person shall furnish undertaking as provided in ORS 32.010 to 32.060." ORS 215.185.
Thus the principal question presented is whether the alternative writ makes a prima facie showing that intervenor's construction project is in violation of the Tillamook County Zoning Ordinance.
The alternative writ alleges the development of Block 24 is in violation of 13 provisions of the Zoning Ordinance. Only one of the alleged violations was considered by the circuit judge and has been briefed in this court. We limit our consideration to that single alleged violation  the substandard lot problem.
As noted above, all of the 12 lots in Block 24 are substandard under the applicable R-1 zone in that they contain less than the required area of 7,500 square feet and are narrower than the required width of 75 feet. Under intervenor's development, there will be a total of 12 houses on Block 24  the 11 under construction plus the previously existing one. This will result in there being an area of about 4,666 square feet per structure, far less than the required 7,500 square feet.
In determining whether intervenor's construction violates the Zoning Ordinance, it is useful to consider two separate questions: (A) Could intervenor have constructed one house on each of the vacant lots in Block 24? (B) Is intervenor's above-described development plan proper?

A
We have a threshold factual problem with the question of whether intervenor could construct one house on each of the vacant lots in Block 24  the question of exactly how many vacant lots there are in that block. Depending upon whose version of the facts is accepted, it appears that the previously existing structure on Block 24 covers part of two or more lots. If this is the case, intervenor may be limited to building on the completely undeveloped lots, which would be 9 or 10 of the 12.
*92 However, all parties have treated this case as if there were 11 vacant lots on Block 24, and, for purposes of discussion, we do likewise.
Intervenor argues one house could have been built on each of the "11 vacant lots" of Block 24 under Section 5.050 of the Tillamook County Zoning Ordinance, which provides:

"General Exception to Lot Size Requirements. If a lot or the aggregate of contiguous lots, as recorded in the office of the county clerk prior to the time this ordinance was adopted, has an area or dimension which does not meet the lot size requirements of the zone in which the property is located the holding may nevertheless be occupied by a use permitted in the zone. However, the use shall be subject to the other requirements of the zone, and if there is an area deficiency residential use shall be limited to the number of dwelling units consistent with the density requirement of the zone. No dwelling shall be built on a lot with less area than 3,000 square feet."
Petitioners counter with the argument that the exception established by Section 5.050 is limited to substandard lots in single separate ownership, and that an owner of contiguous substandard lots must combine them to comply with the area and width requirements of the zone. Petitioners' contention finds support in the treatises on zoning.
"The common exception of lots which were recorded prior to the effective date of a restrictive ordinance is limited to lots which were in single and separate ownership on that date. Under such a provision, an owner is entitled to an exception only if his lot is isolated. If the owner of such a lot owns another lot adjacent to it, he is not entitled to an exception. Rather, he must combine the two lots to form one, which will meet, or more closely approximate, the frontage and area requirements of the ordinance. Where, for example, a landowner held four contiguous lots which each had a frontage of 20 feet, he was regarded as owning 80 feet of frontage and was required to redivide the land consistent with the zoning regulations. This requirement was held reasonable as it permitted him some reasonable use of his land. The same result was reached where the owner of a lot containing 5,000 square feet acquired a contiguous lot of the same size. Under the ordinance he was considered to own a lot of 10,000 square feet." 2 Anderson, American Law of Zoning 56-7, § 8.49 (1968).
See also, 1 Rathkopf, The Law of Zoning and Planning ch. 32 (3d ed. 1969).
In support of this "single separate ownership rule," Anderson and Rathkopf cite dozens of cases. See, e.g., Korby v. Township of Redford, 348 Mich. 193, 82 N.W.2d 441 (1957); Smigliani v. Board of Appeals of Saugus, 348 Mass. 794, 205 N.E.2d 227 (1965); Corsino v. Grover, 148 Conn. 299, 170 A.2d 267, 95 A.L.R.2d 751 (1961); Vollet v. Schoepflin, 28 A.D.2d 706, 280 N.Y.S.2d 950 (1967).
In most, if not all, of the cases cited by Anderson and Rathkopf, the single ownership rule was expressed one way or another in the relevant zoning ordinance. We turn then to the Tillamook County Zoning Ordinance to determine whether it contains such a limitation on the development of contiguous substandard lots in single ownership.
The only possibly relevant provision is Section 5.050, quoted above. Certain parts of this section are self-explanatory: (1) it is applicable only to lot(s) "* * * as recorded in the office of the county clerk prior to the time [the zoning] ordinance was adopted, * * *" i.e., what we have been referring to as substandard lots; (2) no substandard lot can be developed that contains less than 3,000 square feet; and (3) all development of substandard lots is "* * * subject to the other requirements of the zone, * * *" meaning set-back lines, height limits, etc.
We agree with the trial judge that there is "some ambiguity" in the balance of Section 5.050. For purposes of analysis, we *93 break down and paraphrase the balance of that section as follows:
Rule # 1: A substandard lot can be occupied by a use permitted in the zone, meaning for present purposes construction of a single-family house on a substandard lot zoned R-1.
Rule # 2: The aggregate of contiguous lots can be occupied by a use permitted in the zone.
Rule # 3: Residential development of lots substandard in area "* * * shall be limited to the number of dwelling units consistent with the density requirement of the zone. * * *"
As so paraphrased, Rule # 1 is reasonably clear. In context with the rest of Section 5.050, we interpret the phrase "aggregate of contiguous lots" in Rule # 2 to mean contiguous lots in single separate ownership which when aggregated have an area or dimension that is substandard. We believe Rule # 2 is addressed to the possibility, for example, of one person owning three contiguous lots with an aggregate area of 7,000 square feet which are zoned R-1, i.e., minimum lots of 7,500 square feet are required. In such a situation we understand Section 5.050 to mean the person's "holding" (singular  treating the three lots as one) could be occupied by a use permitted in the zone, meaning construction of one single-family house.
Against this background, the most ambiguous part of Section 5.050, Rule # 3, also becomes reasonably clear. The statement
"* * * if there is an area deficiency residential use shall be limited to the number of dwelling units consistent with the density requirement of the zone * * *"
must refer to the situation discussed in connection with Rule # 2, and be a further emphasis that the hypothetical owner of three lots with an aggregate that is substandard can build only one house thereon. We do not believe Rule # 3 could have been intended to modify Rule # 1. Since Rule # 1 permits development of a substandard lot, there is no way such development will be "* * * consistent with the density requirement of the zone * * *"; rather, it will necessarily result in development of greater density than permitted in the zone. Nor do we think Rule # 3 is only an awkward repetition of Rule # 1 stating that the owner of a substandard lot can only build one house thereon because this would be obvious anyway even if Rule # 3 were not in the ordinance.
Thus, as we interpret Section 5.050, Tillamook County has chosen to adopt part, but not all, of the single separate ownership rule discussed by Anderson and Rathkopf. That is to say, Tillamook County requires the single separate owner of contiguous lots which in their aggregate are deficient in area or dimension for even one house to combine those lots so that the use will be less substandard. However, the Tillamook County ordinance appears to be silent on the further question of whether the single separate owner of contiguous lots which in their aggregate are not deficient in area or dimension must develop them in a way that complies with the requirement of the zone.
If we understand them correctly, petitioners urge that we adopt the single separate ownership rule as judge-made law regardless of whether we find it to be expressed in the Tillamook County Zoning Ordinance. We need not here decide whether such judicial power exists because of the view we take of the other issues presented.
Thus, we proceed on the assumption that under the terms of the Tillamook County Zoning Ordinance intervenor would have been entitled to construct one house on each of the vacant lots in Block 24.

B
It does not follow, however, that intervenor can proceed with the current condominium development of Block 24 which, according to the various pleadings and admitted facts, is ignoring and, in fact, abolishing the lot lines in Block 24. We note that the plot plan attached to the alternative *94 writ shows no internal lot lines. We also note that the alternative writ alleges that there are only six feet between each of the various houses intervenor is constructing. This is significant because the Zoning Ordinance requires minimum side yards of five feet in areas zoned R-1; thus, buildings on separate lots would be separated by at least ten feet. But another section of the ordinance provides:
"A minimum distance of six feet shall be maintained between a building designed for dwelling purposes and other building on the same lot." (Emphasis supplied.) § 4.060.
Since it is alleged there are only six feet between the houses being built by intervenor, under Section 4.060 all of Block 24 is apparently being treated as a single lot. Otherwise, intervenor is in violation of the side yard requirements in the zone. While the exact facts have yet to be established, for present purposes we have to accept as true the allegation that Block 24 is being developed as a single lot.
With this in mind, for both conceptual and policy reasons we conclude the alternative writ establishes prima facie that intervenor's project is invalid under the controlling zoning statutes and ordinance. Conceptually, we believe intervenor's treatment of Block 24 as a single unit, with internal lot lines abolished, to be owned in common, cf. ORS ch. 91, Unit Ownership, has terminated the conditions that would have otherwise entitled intervenor to the Section 5.050 exception. Under that section intervenor would have been able to build one house on each vacant lot because the lots were platted and the plat recorded before the zoning ordinance was adopted. However, intervenor no longer owns lots; Block 24 is being treated as a single unit for purposes of being developed as a condominium. Intervenor has abolished the very thing that would invoke the substandard lot exception  the lines of the prezoning lots. Now development of Block 24 must be in accordance with the Zoning Ordinance, i.e., at least 7,500 square feet per house.
Similar reasoning has been employed in other zoning cases. State ex rel. LaVoie v. Building Commission, 135 Conn. 415, 65 A.2d 165 (1948), involved facts somewhat similar to those at bar and presented the question of whether a property owner was entitled to a building permit to construct several homes on substandard lots. The land in question had originally been platted in 1929. Under the terms of a zoning ordinance that became effective in 1938 all of the lots were substandard, but were covered by an exception for previously existing lots. In 1947 the owner filed a revised plat plan that changed the boundaries of many of the original lots. Reasoning that the exception for substandard lots in the 1938 ordinance applied only to lots that existed in 1938 and continued to exist, the Connecticut court held that to the extent that the owner's 1947 revised plat abolished any of the pre-1938 lots, those lots were no longer entitled to an exception and had to be developed in compliance with the zoning ordinance. Cf., Builders Supply & Lumber Co. v. Hillside, 26 Ill. App.2d 458, 168 N.E.2d 801 (1960):
"Plaintiff does not own lot 1 in block 5 as it was platted prior to the adoption of the Zoning Ordinance. It only owns a part of that lot, much smaller than the minimum size prescribed by the ordinance for a residence site. Parcel 1 is not a lot platted prior to 1948. It is about two-thirds of that lot and does not come within the exception for the minimum area. * * *" 26 Ill. App.2d at 461, 168 N.E.2d at 803.
Like the property owners involved in the above two cases, intervenor in this case no longer owns lots that qualify for the substandard lot exception.
This conclusion draws support from policy considerations frequently recognized and relied upon in zoning cases. In Oregon law the clearest expression of these policies is in ORS 215.130(5), which provides:
"The lawful use of any building, structure or land at the time of the *95 enactment of any zoning regulation or amendment thereto, may be continued as such although not in conformity with the zoning regulation, but such nonconforming uses shall not be increased, changed or resumed after a period of interruption or abandonment except in conformity with such provisions as the zoning regulations may provide."
Platted but undeveloped land is not normally regarded as a "use" in zoning law for purposes of establishing a prior nonconforming use. See, e.g., Sherman-Colonial Realty Corporation v. Goldsmith, 155 Conn. 175, 230 A.2d 568 (1967). However, a nonconforming use permitted to continue albeit in violation of zoning requirements and a substandard lot permitted to be developed in a manner that violates zoning requirements are quite similar, and, in general, the same policies should, therefore, apply to both.
Nonconforming uses are not favored because, by definition, they detract from the effectiveness of a comprehensive zoning plan. DeWitt v. Brattleboro Zoning Bd. of Adjustment, 128 Vt. 313, 262 A.2d 472 (1970). Accordingly, provisions for the continuation of nonconforming uses are strictly construed against continuation of the use, and, conversely, provisions for limiting nonconforming uses are liberally construed to prevent the continuation or expansion of nonconforming uses as much as possible. See, Building Inspector of Malden v. Werlin Realty, Inc., 349 Mass. 623, 211 N.E.2d 338 (1965); Arsenault v. Keene, 104 N.H. 356, 187 A.2d 60 (1962); Borough of Demarest v. Heck, 84 N.J. Super. 100, 201 A.2d 75 (1964).
Rules that restrict the recognizability, continuation, and expansion of nonconforming uses are common. The use must be an existing one when the zone is adopted; one merely contemplated is not protected. Washington County v. Stark, Or. App., 95 Adv.Sh. 464, 499 P.2d 1337 (1972). A prior nonconforming use which is abandoned is not thereafter protected. ORS 215.130(5); see, Borough of North Plainfield v. Perone, 54 N.J. Super. 1, 148 A.2d 50 (1959). Enlargement or extension of nonconforming uses is not permitted. ORS 215.130(5); Bither v. Baker Rock Crushing, 249 Or. 640, 438 P.2d 988, 440 P.2d 368 (1968). A nonconforming use cannot be changed to a new and different use and continue to be protected. See, Chilson v. Zoning Board of Appeal of Attleboro, 344 Mass. 406, 182 N.E.2d 535 (1962).
As far as the harmful impact they can have on a comprehensive zoning plan, there is no material difference between nonconforming uses and substandard lots. The same long-recognized policy considerations used to restrict nonconforming uses as much as possible mandate an equally restrictive approach to the substandard lot question. Applying this view to the facts here, it becomes clear that intervenor's development of Block 24 is impermissible.

II
Intervenor contends the alternative writ does not allege facts indicating that petitioners have a prima facie right to the relief they seek, that is, the cancellation of the building permits issued to intervenor and the removal of the homes being constructed pursuant to those permits.
The relevant portion of the alternative writ states:
"Petitioners own residential dwellings in the unincorporated community of Neskowin, Oregon, which dwellings are located in close proximity, to-wit, within 250 feet, of the structures and lands referred to hereinafter to the abatement of which this petition is directed. As such residents and landowners, petitioners have a direct, immediate and pecuniary interest in assuring compliance by respondent, and others, with the Tillamook County Zoning Ordinance referred to hereinafter. This petition is brought pursuant to the provisions of O.R.S. 215.185."
*96 It is clear to us that this is a sufficient allegation of a right to the relief demanded, and we have difficulty comprehending intervenor's arguments to the contrary. If it is intervenor's position that the alternative writ should have contained certain "magic words," such as "petitioners have a right to the relief demanded," such a contention has no merit.
Some older Oregon cases state that it must appear from the alternative writ that a mandamus petitioner's right to the relief sought is both "clear" and "existing." However, in light of the more recent case of State ex rel. Maizels v. Juba, 254 Or. 323, 460 P.2d 850 (1969), we doubt that these adjectives continue to have much meaning. In that case the court stated:
"It is plain, regardless of what this court has said to the contrary, that mandamus has repeatedly been used to require public officers * * * to act in a certain way where the applicable law governing their actions was legitimately in dispute. * * *" 254 Or. at 328, 460 P.2d at 852.
"It is also apparent that in a mandamus context, `clear rule of law' and `clear legal right' have been used erroneously at times to describe a situation where there can be no dispute as to the proper legal theory rather than a situation where a right is inferable as a matter of law from uncontroverted facts. * * * We are now satisfied that in an otherwise proper case, mandamus may be used to decide disputed and difficult questions of law." 254 Or. at 330-331, 460 P.2d at 853.
Under the authority of State ex rel. Maizels v. Juba, supra, we believe petitioners have alleged a sufficient right to the relief they seek, regardless of what adjectives are used to describe it.
As a related point, intervenor maintains that the alternative writ does not contain allegations which enable petitioners to maintain this mandamus proceeding pursuant to ORS 215.185. That statute authorizes mandamus actions by persons "* * * whose interest in real property * * * is or may be affected by the violation * * *" of a county zoning ordinance. (Emphasis supplied.) As intervenor correctly points out, the alternative writ does not contain the word "affected." However, we believe the paragraph of the alternative writ quoted above sufficiently alleges petitioners' property is or may be affected by intervenor's construction project.

III
In addition to alleging a right in petitioners, the alternative writ must allege a corresponding legal duty in respondent. Intervenor argues the writ in this case contains no allegation of facts which would indicate the county commissioners have a duty to: (A) require the removal of the houses in question; or (B) cancel the building permits in question. We discuss these two points separately.

A
Intervenor apparently contends that once it is established that a building is being or has been constructed in violation of a county zoning ordinance, there is no duty on anyone's part to remove the offending structure. We do not so interpret the relevant statutes. They provide:
"The * * * construction * * * of a building * * * in violation of [a county zoning] ordinance * * * shall be deemed a nuisance." ORS 215.180. (Emphasis supplied.)
"In case a building * * * is, or is proposed to be * * * constructed * * * in violation of * * * [a county zoning] ordinance * * * the governing body or district attorney of the county or a person whose interest in real property in the county is or may be affected by the violation, may * * * institute * * * mandamus * * * to prevent * * * abate, or remove the unlawful * * * construction * * *." ORS 215.185. (Emphasis supplied.)

*97 "No person shall * * * construct * * * a building * * * in violation of [a county zoning] ordinance * * *." ORS 215.190.
Statutes are construed to give meaning and effect to all of the terms used therein. The legislature's use of the term "mandamus" in ORS 215.185 makes it obvious to us that they intended that somebody have a duty to remove or require the removal of buildings constructed in violation of a county zoning ordinance. Any other interpretation would read the word "mandamus" out of the statute.
The possibilities are: (1) the county commissioners have a duty to proceed against persons responsible for the unlawful construction; or (2) persons responsible for the unlawful construction have a duty to undo what they have done.
It would be admittedly unusual to interpret the statutes in the first possible way. Normally public authorities have discretion to prosecute criminal offenses, and, by analogy, we presume to take action against public nuisances. Under this view the county commissioners could look the other way and ignore violations of their zoning ordinance, even though criminal penalties are provided, ORS 215.990, and even though violations are "deemed to be a nuisance" by direction of the legislature, ORS 215.185.
But statutes are construed to effectuate the manifest policies and purposes that underlie them. The manifest purpose behind ORS ch. 215 is to regulate and control growth and development in the counties of this state. When ORS 215.180, 215.185 and 215.190 are read together, in context with the balance of ORS ch. 215, it is apparent that there is a strong legislative expression against construction of buildings in violation of a zoning ordinance. Thus, as unusual as it may be, it is possible that the legislature intended to place an affirmative duty on county officials to proceed against such violations  an affirmative duty that could be enforced by way of mandamus.
We need not, however, here decide that question. We interpret the statutes in question to mean, at the very least, that the person responsible for unlawfully constructing buildings has a duty to remove them, and, therefore, mandamus will lie against that person. The partnership responsible for the construction on Block 24 in question in this case has intervened, aligning itself with the county commissioners as a co-respondent. The case can now proceed as if intervenor was originally named as a respondent in the alternative writ. ORS 13.130; see Barendrecht v. Clark, 244 Or. 524, 419 P.2d 603 (1966). If petitioners prevail on remand, the final writ issued will be addressed to both the county commissioners and intervenor. Therefore, it is unnecessary to here resolve which of the parties respondent, if either,[1] has the duty to remove the unlawful buildings.

B
If any party has the authority and duty to cancel the building permits involved in this case, it is the county commissioners.
Claiming that the issuance of building permits is a discretionary act, intervenor contends the county commissioners have no duty to cancel the permits involved in this case because: (1) the original issuance of the permits was a discretionary act; and (2) mandamus will not lie to correct an erroneous exercise of discretion. On the facts at bar we disagree with both propositions.
*98 Building permits are generally required as a way of enforcing zoning ordinances.
"The purpose of requiring permits under a zoning law is to facilitate its enforcement by providing zoning authorities with knowledge of a contemplated use and enabling them to determine whether or not it complies with the law, and by providing a mechanism whereby authorities officially approve or disapprove uses under the zoning regulations * * *." 8 McQuillin, Municipal Corporations 477, § 25.150 (3d ed 1965).
With this in mind, we are not convinced that the issuance of building permits is necessarily a discretionary act. As one commentator has stated:
"So long as the application is in order and the proposed use of the property complies with applicable municipal ordinances or, where although not complying, the premises has a vested non-conforming status, the applicant is entitled to a permit, and it is the duty of the administrative officer to issue one to him.
"The issuing of permits has often been held to be an administrative or ministerial act and the person charged with the duty of issuing permits must follow literally the provisions of the ordinance. * * *" 2 Rathkopf, The Law of Zoning and Planning 55-3, 55-4 (3d ed 1966).
Conversely, when an application for a building permit discloses that the proposed construction is in violation of the zoning ordinance, the administrative official would have no choice but to deny it. See generally, 2 Rathkopf, The Law of Zoning and Planning, chs. 55-56.
Moreover, discretion, if any, involved in issuing building permits is limited in scope. To illustrate, suppose a zoning ordinance set a height limit of 100 feet for a given area. If an official issued a permit for a building higher than 100 feet, he would be acting beyond his authority, and mandamus would be an available remedy to challenge the legality of the permit.
Intervenor resists this conclusion by arguing mandamus does not lie to review an official act that is beyond the official's authority. The following language is cited:
"* * * [I]f the required act involves the exercise of judgment or discretion * * * mandamus will not lie to compel a tribunal to amend or correct its judgment, even though it may have acted erroneously. * * *" State ex rel. Harvey v. Malheur County Court, 54 Or. 255, 258, 101 P. 907, 909, 103 P. 446 (1909).
However, that same opinion then proceeds to consider the merits of an allegedly erroneous decision. And an opinion denying a petition for rehearing in that case states that the question of whether mandamus was the proper remedy "is purely academic, and all that was said on that subject was dictum." 54 Or. at 263-264, 103 P. 446.
More recent cases make it clear to us that the "dictum" in State ex rel. Harvey v. Malheur County Court, supra, no longer correctly expresses the law of this state. Although some of the more recent cases are difficult to reconcile, a common theme running through most of them is: when a public official has acted in a way that violates some statute, rule or ordinance, he has an implied legal duty to correct his error, and mandamus is an appropriate remedy to compel him to do so.
State ex rel. Ricco v. Biggs, 198 Or. 413, 255 P.2d 1055, 38 A.L.R.2d 720 (1953), was a mandamus proceeding against a circuit judge to require him to decide the merits of a change of venue motion in a misdemeanor prosecution. The circuit judge had interpreted a statute as prohibiting changes of venue in misdemeanor cases. The Supreme Court summarized some of the circuit judge's contentions in opposition to the writ of mandamus as follows:
"* * * He maintains that he had jurisdiction to pass upon the motion; that this jurisdiction vested in him the power to decide erroneously as well as correctly; and that, for a mistake in judgment, it cannot be said that he abused *99 his discretion." 198 Or. at 421, 255 P.2d at 1059.
The Supreme Court held that there was a constitutional right to change of venue in all criminal cases, and in issuing a peremptory writ requiring the circuit judge to consider the merits of the change of venue motion, necessarily rejected the above quoted contention.
State ex rel. Pearcy v. Long, 234 Or. 630, 383 P.2d 377 (1963), was a mandamus proceeding to compel a circuit judge to decide the merits of a divorce case. The Supreme Court ruled that the circuit judge had erroneously concluded that he did not have jurisdiction, and issued the writ.
State ex rel. Southern Pacific Co. v. Duncan, 230 Or. 179, 368 P.2d 733, 98 A.L.R.2d 617 (1962), was a mandamus proceeding to compel a circuit judge to vacate a discovery order he had entered in a civil case. The Supreme Court ruled that the circuit judge had erroneously issued the discovery order, and issued the writ.
The one anomalous case in this series is State ex rel. Venn v. Reid, 207 Or. 617, 298 P.2d 990 (1956), which involved an attempt to mandamus a circuit judge to discharge an allegedly illegally constituted grand jury. The circuit judge demurred, thus admitting for purposes of the demurrer the truth of the allegations about illegal composition of the jury. The majority in that case held that mandamus was not an available remedy, apparently reasoning that no statute imposed a duty on the circuit judge to discharge the jury. The dissent pointed out:
"* * * No statute required the defendant judge in State ex rel. Ricco v. Biggs, 198 Or. 413, 255 P.2d 1055, 38 A.L.R.2d 720, on which the majority rely, to determine whether the relator, under indictment for a misdemeanor, was entitled to a change of venue. * * * The duty here arises as a consequence of the violation of statutes governing the selection of the jury. * * *" 207 Or. at 636, 298 P.2d at 999.
Reading these cases together, it seems to us that mandamus is proper to attack an erroneous official decision. By "erroneous" we mean a decision that violates a statute, or in this case, an ordinance. Stated differently, it appears that officials have an implied legal duty to undo any actions they have taken in violation of a statute or ordinance.
As applied to the facts at bar, this means that the County Commissioners of Tillamook County have a duty to cancel the building permits in question if they were issued in violation of the zoning ordinance. Courts in other states have permitted similar mandamus actions seeking the cancellation of invalid building permits. Brady v. Board of Appeals of Westport, 348 Mass. 515, 204 N.E.2d 513 (1965); Bowes v. Inspector of Buildings of Brockton, 347 Mass. 295, 197 N.E.2d 676 (1964); Garrou v. Teaneck Tryon Co., 11 N.J. 294, 94 A.2d 332, 35 A.L.R.2d 1125 (1953). Since we have already concluded that the alternative writ makes the required prima facie showing that the building permits were issued in violation of the zoning ordinance, it follows that the alternative writ also makes the required prima facie showing that the county commissioners have the duty to cancel those permits.

IV
In further support of its demurrer, intervenor contends the law requires a prior demand as a prerequisite to seeking mandamus, and that the alternative writ in this case fails to sufficiently allege a prior demand having been made on the respondent.
The relevant portion of the alternative writ states:
"* * * On June 15, 1971, the Developers [i.e., intervenor] were further notified by letter of more serious violations and citations given of relevant decisions and case law. A copy of said letter notification is attached hereto as Exhibit `D'. Petitioners further offered to cooperate with Developers *100 in seeking the earliest possible court determination of the validity of the Developers' actions by promptly filing a declaratory judgment suit and joining with Developers in seeking an early determination by the court. Developers summarily rejected said offers, refused to suspend building construction on the units under construction on Block 24, and, in effect, advised that petitioners would have to proceed further by filing an appropriate legal proceeding if they wished to obtain a legal determination. On June 15, 1971, petitioners notified the district attorney of the respondent county of said claimed violations and the invalidity of said building permits and demanded that the county proceed to cancel said permits and require the removal of said structures pursuant to O.R.S. 215.185 et sequitur. A copy of said letter demand is attached as Exhibit `E'. Respondent has failed and refused to do so."
The copy of the June 15 demand letter to intervenor attached to the alternative writ as Exhibit D indicates that a copy of that letter was sent to "Dick Smith," who we will assume is the Richard Smith, Tillamook County Planning Consultant, referred to in the complaint in intervention.
The June 15 demand letter to the Tillamook County District Attorney states:
"You may have been made aware by Dick Smith of the controversy now underway over the issuance of the * * * permit and the construction which is now going on at Neskowin. According to Dick, he conferred with you on the issuance of the building permit which you apparently approved * * *.
"* * *
"I appreciate this is an awkward situation for all concerned but I do think it is desirable to move rapidly to cancel the permit as it appears wholly invalid. This would tend to minimize any loss on Spliid's part and before his construction progresses any further. Every day's delay means that much more loss to Spliid. I have repeatedly called to his attention the terrible risk he is running but he remains adamant. However, I am duty bound, unless everyone moves rapidly on this, to insist that the county follow the provisions of ORS 215.185.

"* * *." (Emphasis supplied.)
It thus appears that the county commissioners were indirectly informed of petitioners' demand, either through Richard Smith or through the district attorney. Nevertheless, intervenor insists the alternative writ is defective because it fails to allege a demand made personally on the county commissioners. This contention presents two questions: (A) Is any allegation of prior demand necessary in this case? (B) If so, is the allegation in the alternative writ, quoted above, sufficient?

A
The two most recent Oregon cases to consider the question of whether a demand must be made before seeking a writ of mandamus are State ex rel. Pearcy v. Long, 234 Or. 630, 383 P.2d 377 (1963), and State ex rel. Southern Pacific Co. v. Duncan, 230 Or. 179, 368 P.2d 733, 98 A.L.R.2d 617 (1962). Both state it is a "general rule" that before mandamus will lie a relator must have previously demanded performance of the act he seeks to compel by way of the writ. Both further state the "general rule" is not "inflexible," and when
"* * * it appears that the demand would be unavailing, demand is unnecessary." State ex rel. Pearcy v. Long, 234 Or. at 633, 383 P.2d at 378; State ex rel. Southern Pacific Co. v. Duncan, 230 Or. at 181, 368 P.2d 733.
Before attempting to determine exactly what the scope of this exception is, we consider the origin and purposes of the demand requirement.
As authority for the general rule requiring demand, both State ex rel. Pearcy v. Long, supra, and State ex rel. Southern Pacific Co. v. Duncan, supra, cite State ex rel. Warren Const. Co. v. Beals, 73 Or. 442, 144 P. 678 (1914), which was apparently the first Oregon case to consider the necessity of a demand before applying for a writ of mandamus. The petitioner in Beals sought a writ of mandamus to compel the common council of a city to levy a tax to pay a debt the city owed to the petitioner. The alternative writ alleged petitioner had *101 demanded that the city treasurer pay this debt, but did not allege petitioner had demanded that the common council levy the taxes necessary to do so. The Beals court held that on the facts before them a demand was a condition precedent to seeking mandamus and that the demand on the city treasurer was no substitute for a demand on the city council.
In reaching this conclusion, the Beals court relied on such authorities as Moses on Mandamus and High on Extraordinary Legal Remedies. The court also quoted the following material:
"`When the duty to be performed is of a public nature, no duty to demand its performance devolves upon anyone, and express demand for its performance is not required as a condition of application for the writ. The law itself stands in the place of the demand, and the omission to perform stands in the place of a refusal. * * * The rule is otherwise as to duties which do not partake of a public nature, and more nearly affect private rights. In such cases, express demand is required, and a refusal to comply with such demand, either direct or by conduct, must appear.' [2 Bailey, Habeas Corpus, 792-93.]" 73 Or. at 447, 144 P. at 679.
"`The authorities are not harmonious on the question as to when a demand is necessary as a precedent condition to granting the writ. It is undoubtedly the general, if not undeviating, rule that, in cases where private rights only are involved, a demand must be made and alleged. There is a distinction, however, between cases involving mere private right to have a duty performed, and those in which public interests generally are affected, and in which one citizen has the same interest in the performance of a public duty as another. When no such general interests are involved, and merely private rights are affected, the relator must, in a proceeding by mandamus, allege and prove demand and refusal by the person or persons whom it is sought to coerce by the writ; but when a duty is strictly of a public nature, as where it is due by a public officer, and is not a special duty affecting peculiarly the relator, there is no one specially empowered to demand its performance, and there is no necessity for a demand and refusal.' [Spelling, Injunction and Other Extraordinary Remedies 1191-92, § 1381 (2d ed. 1901).]" 73 Or. at 447-448, 144 P. at 679.
"`The question of the necessity of a demand and refusal to perform the duty in controversy is one not wholly free from doubt, and an apparent conflict of authority may be observed in the adjudications upon this subject. The doctrine has been broadly asserted, and is sustained by the most respectable authorities, that in no event will the writ be granted to compel the performance of an official duty, until demand has been made upon the officer and he has refused to act. Other cases have gone only to the extent of insisting upon proof of demand and refusal before granting the writ in absolute or peremptory form. The better doctrine, however, and one which has the support of strong authority, is that which recognizes a distinction between duties of a public nature and affecting only the public at large, and those of a private nature especially affecting the rights of individuals. And it is held, where the person aggrieved has a private interest in or claims the immediate benefit of the act sought to be coerced, that he must first make a demand upon the officer to lay the foundation for relief by mandamus. But as regards duties of a strictly public nature, incumbent upon public officers by virtue of their office, and which they are sworn to perform, no demand and refusal are necessary as a condition precedent to relief by mandamus. In such cases, no individual interests being affected, there is no one specially empowered to demand performance of the duty, and no necessity for a literal demand and refusal.' [High, *102 Extraordinary Legal Remedies 48-49, § 41 (3d ed. 1896).]" 73 Or. at 448-449, 144 P. at 679.
Repeatedly emphasizing that the petitioners' claim was a purely private one in which the public had no interest, 73 Or. at 446-450, 144 P. 678, the Beals court concluded, based on the authorities quoted, that a prior demand was essential before proceeding by way of a writ of mandamus.
Thus, as we read Beals it is somewhat an overstatement to say it stands for a "general rule" that demand must be made before initiating mandamus proceedings. It would seem to be more accurate to state that demand is generally required when the interests involved are private, but is not necessarily required when the interests involved are public.
This interpretation of Beals draws some additional support from the next Oregon case to consider the necessity of a demand, State ex rel. Anderson v. Hare, 78 Or. 540, 153 P. 790 (1916), decided a little more than a year after Beals. In State ex rel. Anderson v. Hare, supra, the court stated:
"* * * As a general rule, where the duty to be performed by an official is of a purely public nature, wherein no individual right or duty is concerned, and where there is no one person upon whom the right or duty devolves to make a demand for performance, an express demand or refusal is not necessary: See Spelling, Ex. Relief, § 1381. The law does not require a useless thing. But there are exceptions to this rule. Where the proper mode of performance is doubtful, a demand specifying the proper mode will be required before the mandamus will be granted: Merrill, Mandamus, § 224, p. 279." 78 Or. at 549, 153 P. at 791.
Also, our interpretation of Beals would make the law in Oregon consistent with that in other jurisdictions:
"* * * In passing upon the necessity of a demand before seeking mandamus, the courts have drawn a distinction between duties of a public nature which affect the public at large and those of a private nature affecting only the rights of individuals. In the latter class of cases, it seems to be imperative that previous to making application for the writ to command performance of a particular act, an express and distinct demand must be made by the relator upon the respondent to perform the act, and it must appear that he refused to comply with such demand, either in direct terms or by conduct from which a refusal can be conclusively inferred. But where it is one of a public nature, affecting the people at large, and there is no one especially empowered to make the demand, no demand seems to be necessary. In such case, the law itself stands in lieu of a demand, or as a continuing demand, and omission to perform the required duty in place of a refusal. * *" 52 Am.Jur.2d 414-15, Mandamus § 91.
See also 55 C.J.S. Mandamus § 32, pp. 60-63.
The next Oregon case to mention this question of demand, Kollock v. Barnard et al., 116 Or. 694, 242 P. 847 (1926), adds nothing to an understanding of the law on this question because it merely held the demand that had been made by the petitioner was sufficient.
This brings us back to State ex rel. Pearcy v. Long, supra, and State ex rel. Southern Pacific Co. v. Duncan, supra, which are the only other Oregon cases we are aware of that have considered the necessity for a demand as a prerequisite for seeking mandamus. State ex rel. Pearcy v. Long, supra, was an effort to mandamus a circuit judge to decide the merits of a divorce case, which presented the question of whether the circuit court had jurisdiction to do so. State ex rel. Southern Pacific Co. v. Duncan, supra, was an effort to mandamus a circuit judge to vacate an order requiring the defendant in a civil action, a railroad corporation, to produce a train conductor and engineer for the taking of depositions, which presented the question of *103 the proper interpretation to be placed on a discovery statute.
Although, as noted above, the court in both of those opinions referred to a "general rule" requiring a prior demand before proceeding in mandamus, those passages are dicta in light of a court's conclusion in both cases that prior demand was "unnecessary" because it appeared it would be "unavailing." Moreover, and more importantly, the results, if not all the language, in both of those cases are fully consistent with our reading of State ex rel. Warren Const. Co. v. Beals, supra, in that since the interests involved in those most recent cases were public in nature, no demand was necessary before initiating mandamus.
Interpreting State ex rel. Pearcy v. Long, supra, and State ex rel. Southern Pacific Co. v. Duncan, supra, as applying, sub silentio, the rule originally articulated in State ex rel. Warren Const. Co. v. Beals, supra, that the demand requirement turns on whether the interests asserted are public or private, is more logical we believe, than attempting to determine the meaning of or apply the statement that a prior demand is unnecessary when it would be unavailing.
State ex rel. Southern Pacific Co. v. Duncan, supra, cited with approval People ex rel. Adams v. McKibben, 377 Ill. 22, 35 N.E.2d 321 (1941), which states:
"* * * The averments of the petition and answer clearly disclose that respondent would not have complied with the demand if it had been made, and under such circumstances no demand is necessary. * * *" 377 Ill. at 25, 35 N.E.2d at 322.
Such reasoning goes a long way toward saying prior demand is never required, because the question of whether prior demand should have been made before filing for a writ of mandamus never arises unless the respondent is opposing doing what the alternative writ would require. In other words, simply by opposing the alternative writ the respondent fairly clearly indicates he would not have complied with a prior demand. Under these circumstances the demand-is-unnecessary-if-it-would-be-unavailing "exception" consumes the "general rule" requiring prior demand.
In any event, whatever the proper meaning and effect of the exception that excuses prior demand when it appears it would be unavailing, we are convinced a prior demand in this case would have been at least as unavailing as it would have been in State ex rel. Pearcy v. Long, supra, and State ex rel. Southern Pacific Co. v. Duncan, supra. This is indicated by, among other things, the fact that the demand made on the district attorney produced no results.
We have been unable to determine the exact policy justifications that prompted courts to adopt the prior demand requirement in mandamus cases. The only policy claimed to support this requirement we have found mentioned in any Oregon cases is the following:
"`A demand must be made on the proper officer to perform the duty desired before a writ of mandamus will be issued to compel him to discharge such duty. It would be an abuse of justice to convict one of nonfeasance or misdemeanor in neglecting his official duty when he has not refused to do what may be required, and to mulct him in costs when he is not in default * *.'" Merrill, Mandamus 276, § 222 (1892), quoted in State v. Beals, supra, 73 Or. at 447, 144 P. at 679.
We find this reasoning unpersuasive. In no way is the issuance of a writ of mandamus at all similar to convicting "one of non-feasance or misdemeanor in neglecting his official duty"; most of the time, as in the case at bar, the writ is designed to resolve conflicting interpretations of a statute or ordinance. And we fail to perceive how a public official to whom the writ is addressed will ever be "mulcted" simply because no prior demand was made upon him. Under Oregon procedure, courts most often issue an alternative writ, see *104 ORS 34.160, which commands the respondent to "do the act required to be performed, or show cause * * * why he has not done so * * *," ORS 34.150. If the respondent complies with the writ, he incurs no costs. If the respondent appears to show cause, i.e., oppose the writ, then it is reasonable to assume he would not have complied with a prior demand, and the court costs he incurs cannot in any way be said to be caused by his failure to receive a prior demand.
Our duty in this case, however, is not to determine whether we would adopt a demand requirement were the question one of first impression, but rather to apply that requirement, as defined in the prior Oregon Supreme Court cases, to the facts at bar.
It is apparent that the interests petitioners seek to protect in this case by way of a writ of mandamus relate to the proper enforcement, administration and application of our state statutes requiring comprehensive zoning plans, and the county-wide ordinance adopted by Tillamook County pursuant to those statutes. Respondent's duties to properly administer those statutes and their zoning ordinance are clearly public in nature. Accordingly, we hold it was not necessary that petitioners make a prior demand on respondent before proceeding in mandamus. State ex rel. v. Beals, supra. In the alternative, if a demand might have otherwise been required, we hold the failure to make one is excused because in this case it would have been "unavailing." State ex rel. Pearcy v. Long, supra; State ex rel. Southern Pacific Co. v. Duncan, supra.

B
Even if a prior demand were necessary in this case, notwithstanding our conclusions that the interests involved are public and that demand would have been unavailing, we believe, as a further alternative holding, that the requirement was satisfied by demand on the Tillamook County District Attorney as alleged in the alternative writ. See Stroh v. State Accident Ins. Fund, 93 Or.Adv.Sh. 1819, 492 P.2d 472 (1972), overruling McCain v. State Tax Comm., 227 Or. 486, 360 P.2d 778, 363 P.2d 775 (1961).
Petitioners' letter to the district attorney, attached to the alternative writ as Exhibit E, insisted "that the county follow the provisions of ORS 215.185." (Emphasis supplied.) The district attorney is the legal officer for the county, see ORS 8.690. In the normal course of events a legal matter taken up directly with the district attorney which affected the county would promptly be brought to the attention of the appropriate county officials. The presumption is that official duty has been regularly performed. ORS 41.360(15).
In summary, we hold that petitioners are entitled to an opportunity to prove the allegations of the alternative writ. We express no view at this time on what relief should be granted if petitioners are able to do so.
Reversed and remanded for further proceedings consistent with this opinion.
NOTES
[1]  We do not mean to here decide the nature of the relief that should be granted to petitioners should they prove the allegations of the alternative writ. We only hold that the alternative writ contains a sufficient allegation that one of the parties respondent has a prima facie duty to remove the structures in question. Whether this prima facie duty is of the nature that will entitle petitioners to a peremptory writ will depend on the nature of the proof and possible affirmative defenses that go beyond the scope of the record now before us.
