
68 So.2d 817 (1953)
STATE ex rel. LACEDONIA
v.
HARVEY et al.
Supreme Court of Florida. Division A.
December 18, 1953.
J.Y. Porter, Key West, for appellant.
M. Ignatius Lester and J. Lancelot Lester, Key West, for appellees.
SEBRING, Justice.
The appellant has appealed from an order which quashed an alternative writ of mandamus and dismissed her proceeding.
According to an agreed stipulation of facts entered into by the parties, the appellant was the owner of a city lot in Key West, Florida, on which was located an apartment house. She applied to the building inspector of the city for a building permit to construct an addition to the apartment house. The building inspector issued the permit, but a few days later the city commission ordered the building inspector to cancel and revoke the same because the building plans upon which the permit was issued showed that one of the sidewalls of the structure was to be erected within 4 inches of the side property line of the lot upon which the building was to be located, in violation of the requirements of the zoning ordinances of the city.
The zoning ordinances of the city contained the following applicable provisions:


*818 "Section 8
"Business `B' Districts
"Sub-Section A. In a Business `B' District, the following regulations shall apply:
"Sub-Section B. A building may be erected, altered, arranged, designed or used, and a lot or premises may be used for any of the following purposes and for no other:
"a. Any building or use permitted in Business `A' District.
"b. Apartment and multiple family dwelling.
"c. Hotels having 25 or more sleeping rooms.

* * * * * *
"Sub-Section E. In Business `B' Districts, dwellings shall conform to the side yard regulations for Residence `C' Districts, namely:
"a. In case of a dwelling there shall be two side yards, one on each side of the main building, neither of which shall be less than 5 feet. * * *" (Emphasis supplied.)
See Section 8, Title 34, Code of the City of Key West, Florida, 1952.
The appellant maintains that a dwelling is a single residence, domicile or abode, usually occupied by a person there residing with his family; and that inasmuch as the addition to the apartment house to be erected does not come within the definition of "a dwelling," the requirement of a 5-foot setback from side lot lines, as provided in the zoning ordinance as respects dwellings, cannot be imposed as a valid limitation upon her right to build the addition to her apartment to be used as a place in which to conduct one of the businesses permitted by the applicable provisions of the ordinances.
We find no merit in this contention. The meaning of the word "dwelling" may vary with the context of its usage. Michaels v. Township Committee of Pemberton Tp., 3 N.J. Super. 523, 67 A.2d 324. Compare Massachusetts Audubon Soc. v. Ormond Village Imp. Ass'n, 152 Fla. 1, 10 So.2d 494; Overstreet v. Tubin, Fla., 53 So.2d 913. In the ordinance here under consideration the word is first used in a section designating one of the permitted uses of property as follows: for the purpose of "multiple family dwelling." Sec. 8(B)(b), Title 34, supra. In view of this fact it is not reasonable to imply, in the absence of an express qualification, that the term would have been used in a different, more restrictive, sense in the clause outlining conditions for such use. A "dwelling" is, by its ordinary definition, merely "a building used for human habitation", Funk and Wagnall's New Std. Dictionary of the English Language, 1949 ed.; and we think it is plain that, in employing that word in subsection E of section 8 of the zoning ordinance, the municipal authorities intended that it should be taken in a broad rather than a narrow sense, and that it should apply to all buildings "used for human habitation" or living quarters, without regard to the number or nature of units in a particular structure, including apartment houses, multiple-family dwellings, and hotels.
It is settled that a peremptory writ of mandamus will not issue in order to enable the person in whose behalf it is sought to effect or accomplish an illegal purpose. State ex rel. Edwards v. County Commissioners of Sumter County, 22 Fla. 1; see also 34 Am.Jur., Mandamus, sec. 36, 37. "Mandamus to compel the performance of an official act will not lie unless the obligation to do the act is both peremptory and plainly defined. Moreover, the act must not only be lawful and proper in itself, but it must be one that the defendant may properly do, that is to say, it must be authorized by and be in accordance with law, not contrary thereto, or in violation thereof, and must not be prohibited by injunction." McQuillin, Municipal Corporations, section 51.14, pp. 466, 467, 468.
As the law applies to the matter at hand, the rule is that "In mandamus proceedings to compel the issuance of a building permit, it must appear that the relator had a right *819 to build on the lot upon which he desires to build. Applications for building permits cannot be granted legally unless all valid provisions of the law have been complied with by the applicant. In recent years, many restrictions and prohibitions exist in virtually all urban centers relating to the location and manner of construction, alteration and repair of the various kinds of buildings and structures found therein and so-called zoning regulations applicable to a part or parts or to the entire municipal area, have become general. The issuance of building permits must be in accordance with all such valid regulations." McQuillin, Municipal Corporations, section 51.54, pp 574, 575, 576, 577, 578.
From the conclusions reached it follows that the judgment appealed from should be affirmed.
It is so ordered.
ROBERTS, C.J., and TERRELL and MATHEWS, JJ., concur.
