The plaintiff, who owns a two-family residence on a corner lot in Longmeadow, constructed a dry stone wall on his front and side lawns. When the zoning board of appeals of Longmeadow (board) denied the plaintiff’s application for a variance to allow the wall, he appealed to Superior Court pursuant to G. L. c. 40A, § 17. Following a jury-waived trial, the judge annulled the board’s decision. The parties filed cross-appeals. The defendants argue that it was error to conclude that the board’s denial of the variance was unreasonable. The plaintiff argues that the variance should have been granted and that, even if he is not entitled to a variance, one was not required because under the applicable by-law the wall could be constructed as of right.
*119We conclude that a variance was unnecessary and the wall could be constructed as of right.
Background facts and proceedings. We summarize the essential and undisputed facts. The plaintiff’s two-family residence sits on a six-sided comer lot at Longmeadow Street and Fern-leaf Avenue in Longmeadow. The front and side yards of the lot are maintained as lawn space; the angled strip of back yard is heavily wooded. In 2004, the plaintiff constructed an approximately two-foot high, L-shaped stone wall on his front and side yards, adjacent to Longmeadow Street and Femleaf Avenue.2 Bordering streets are heavily trafficked and the plaintiff constructed the wall to provide an enclosed play area for his tenant’s children. As the parties agreed and the judge found, “[t]he wall, at its closest points, is approximately seventy feet from Long-meadow Street and forty feet from Fernleaf Avenue. The wall does not interfere with drivers’ visibility from either street.” Construction was nearly complete when the town’s building commissioner notified the plaintiff that the fence was in violation of art. IV, § K, of the by-law because it was within the primary setback of the residence.
After receiving the notice, the plaintiff briefly ceased construction but thereafter completed constmction of the wall and then applied for a variance to allow it to remain in place. The board denied the application, and the plaintiff appealed to Superior Court, pursuant to G. L. c. 40A, § 7. Prior to commencement of the trial, his counsel requested a ruling that “[t]he evidence supports a finding that the Zoning Bylaw can reasonably be interpreted to allow the stone wall as constructed without a variance.”3
In her memorandum of decision, the judge determined that the board’s denial of the variance was unreasonable. She further *120determined that the stone wall was “within the primary setback line, in violation of the Town’s By-law.”
Discussion. Although we discern no error in the board’s conclusion that the plaintiff failed to satisfy the conditions needed to obtain a variance under G. L. c. 40A, § 10, that decision was premised on a faulty determination that a variance was required under the by-law. See APT Asset Mgmt., Inc. v. Board of Appeals of Melrose, 50 Mass. App. Ct. 133,138 (2000) (construction of provisions of zoning ordinance was question of law to be determined by court where board’s denial of special permit “was expressly based upon the sole reason that the principal use was prohibited under the ordinance, as construed by the board”).
The issue of interpretation of the by-law was raised by the plaintiff in Superior Court and argued by both sides in that court and in this appeal. We “express our views upon the issue that has been argued,” Simeone Stone Corp. v. Board of Appeals of Bourne, 345 Mass. 188, 192 (1962), “[b]ecause it may avoid further court proceedings and expense in a matter of community interest.” Ibid. See Paul Livoli, Inc. v. Planning Bd. of Marlborough, 347 Mass. 330, 336 (1964); Vassalotti v. Board of Appeals of Sudbury, 348 Mass. 658, 662 (1965); Gallagher v. Board of Appeals of Falmouth, 351 Mass. 410, 415 (1966); Roberts-Haverhill Assoc. v. City Council of Haverhill, 2 Mass. App. Ct. 715, 717 (1974).
Although the board’s interpretation is entitled to some measure of deference, the “interpretation is not dispositive.” Tanner v. Board of Appeals of Boxford, 61 Mass. App. Ct. 647, 649 (2004). “[T]he court determines the content and meaning of statutes and by-laws and then decides whether the board has chosen from those sources the proper criteria and standards to use in deciding to grant or to deny the variance or special permit application.” Britton v. Zoning Board of Appeals of Gloucester, 59 Mass. App. Ct. 68, 73 (2003). “A zoning by-law must be read in its complete context and be given a sensible meaning within that context. The intent of the by-law is to be ascertained from all its terms and parts as well as the subject matter to which it relates.” Murray v. Board of Appeals of Barnstable, 22 Mass. App. Ct. 473, 478 (1986) (citations omitted). “Nor do we interpret *121a [by-law] so as to render it or any portion of it meaningless.” Adamowicz v. Ipswich, 395 Mass. 757, 760 (1985). See Korkuch v. Planning Bd. of Eastham, 26 Mass. App. Ct. 307 (1988).
We agree with the plaintiff that he is entitled to construct the fence as matter of right under the by-law, interpreted in light of the foregoing rules of construction. The by-law, at art. IV, § K, provides:
“Fences
“No fence shall be erected in any zone except a fence which shall be within one of the classes and of a height as set forth herein, subject to the provisions of Article VI, Section H and which shall not be constructed forward of the primary setback” (emphasis added).4
Under the by-law, the terms “primary setback” and “primary setback line” are distinct concepts. Article II defines “primary setback line” as “[t]he line running parallel or concentric to the street line which includes that part of the building nearest to such street line. In the case of a comer lot the primary setback requirement shall be observed from all bordering streets.” A “primary setback” is defined in art. VI, § B (entitled “Front Yards and Stmcture Set-Backs”), at par. T.
“1. Primary Set-Back
“la. In the Residence A-2, the Residence A-l, and Agricultural Zones, no stmcture, and no addition thereto, extension or part thereof,. . . shall be erected, constmcted, or placed nearer than 40 feet to the line of the street or way upon which the lot fronts.”
Thus, a stmcture — which, under the by-law, also includes a fence5 — may not be built “nearer than 40 feet to the line of the street or way upon which the lot fronts.” Ibid. This no-build area is elsewhere called a “primary set back dimension.” Art. VI, § B, par. lc.
*122The defendants’ interpretation of the by-law as precluding construction of a fence forward of the primary setback line — that is to say, any fence in front of the plaintiffs house — is inconsistent with the plain language of the by-law. It requires the addition of a word to the text (“line”) that changes the plain meaning of the existing language, which prohibits the construction of a fence “forward of the primary setback,” a dimension that lies between the street and forty feet “to the line of the street.”6 To assist the reader, we have included in the Appendix to this opinion a sketch illustrating the manner in which setback lines might define setbacks or setback areas on a hypothetical comer lot.
The by-law is not a model of clarity. Numerous provisions permit the construction of fences pursuant to a deleted provision, art. IV, § B, par. 1.2h.7 Interpreting art. IV, § K, as do the defendants could result in unintended restrictions. The primary setback dimension applies to “any zone.” In an agricultural zone, raising and keeping “horses, cows, and sheep” is permitted by art. IV, § C. To the extent farm animals must be fenced, the defendants’ interpretation would require that the animals be restricted to an area behind the building closest to the street, regardless how far from the main street that building is situated.
We have endeavored to achieve a sensible result, with all *123parts and words in the by-law made operative to the extent that task was possible.8
Conclusion. Because the plaintiff’s wall is not nearer than forty feet to the line of either street upon which his lot fronts, he is entitled to build his wall as of right and a variance is not necessary. The judgment is vacated, and a new judgment shall enter which declares that the plaintiff was not required to obtain a variance to construct the stone wall. See Vassalotti v. Board of Appeals of Sudbury, 348 Mass. at 662.
So ordered.
*124Appendix.
[[Image here]]
The plaintiff does not dispute the defendants’ position that the low stone wall is a fence for purposes of the by-law.
The plaintiff introduced evidence, through testimony of the town building commissioner, regarding interpretation of the by-law. During trial and in her closing, plaintiff’s counsel argued that the plaintiff had met the statutory requirements for a variance and that, properly interpreted, the by-law permitted the plaintiff’s fence to be built as matter of right. Counsel for the defendants argued in closing that the by-law regarding what constitutes a fence and where a fence may be located were applicable to the plaintiff’s stone wall.
Article VI, § H, sets out requirements regarding visual clearances.
As defined in art. II, par. 44, “A structure shall be anything composed of any material or combination of materials which is erected, constructed, or placed upon the property for apparent permanent or seasonal use, and which occupies more than four square feet in projected base area, or two feet in maximum horizontal dimension, and shall include a fence as hereinafter defined.”
Consistent with this interpretation is the treatment of setback lines, as compared to setback areas or dimensions, elsewhere in the by-laws. For example, in the definitions section of the by-laws a “secondary setback line” is “a line that “run[s] parallel or concentric with the street line which includes that part of the building nearest to the rear property line.” Art. II, par. 38. A “secondary setback” is the area on the lot where no structure may be built that is “nearer to the line of the street or way upon which the lot fronts than a line constructed parallel or concentric with the aforesaid street line and through the rearmost extremity of the main residence” or extension. Art. VI, § B, par. 2(2a). Similarly, a “side-yard” is defined as “a required open unoccupied space within the lot between a side lot line which is not a street line and the parts of a building which are nearest to such side lot line. Such a side yard must extend through from the set-back lines to the rear yard.” Art. II, par. 40. Article VI, § C, par. l(la), further defines side yards as “the area between the primary and secondary set-back lines . . . .”
See, e.g., art. VI, § B, par. 2(2a) (prohibiting construction of any structure forward of the secondary setback “except the main dwelling . . . and a fence . . .”); art. VI, § C, par. l(la) (prohibiting construction of any structure “[w]ithin the area between the primary and secondary set-back lines . . . except a fence . . .”).
A town is not precluded from enacting by-laws prohibiting construction of fences forward of the primary setback line. We hold only that the language used in the current version of the by-law does not impose such a rule.