Macke Co. reported yesterday that its profits were flat for the second quarter of the year because losses on restaurant operations wiped out gains from other businesses.

Macke earned $1.23 million (40 cents a share) for the three months ended March 31, just $10,000 more than it earned in the same period a year ago. Sales climbed to $70.8 million from $65.5 million.

Chairman Meyer Gelfand said Macke showed a 19 percent improvement in nonfood services, and food operations were up 13 percent, excluding the company's seafood restaurants. Declining customer counts and higher costs at the Family Fish House chain ate up the gains in the other operations, he added.

For the first six months of the year, Macke earnings fell to $2.2 million (72 cents) from $2.6 million (85 cents), while sales increased to $139.5 million from $128.3 million.

Meanwhile, two Northern Virginia electronics firms, a discount retailer and a Baltimore-based bank holding company all reported yesterday that their first-quarter earnings were lower than year-ago levels.

Sales for Scope Inc. of Reston rose 10 percent for the quarter from $15.5 million to $17.1 million. But earnings decreased 40 percent from $908,000 (75 cents a share) to $546,000 (45 cents).

Scope Chairman William C. Schaub told the company's stockholders yesterday that the lower net income was caused principally by continued high debt service expenses.

But the first-quarter results are better than those for the fourth quarter of 1979 and "reflect initial progress toward recovery of profit margins," Schaub said.

LogEtronics Inc., a Springfield based firm, also reported reduced earnings yesterday. Although the firm had record revenues of $7.6 million compared with $6.4 million for the first quarter last year, net income dropped from $306,000 (29 cents a share) to $298,000 (28 cents).

W. Bell & Co., a Rockville-based catalogue sales firm, reported a $64,600 loss for the quarter compared with a $151,900 (15 cents a share) gain last year. Earnings decreased despite a 14 percent increase in sales from $15.8 million to $18.1 million.

Ryland Group Inc. of Columbia reported a 10-percent increase in profits for the first quarter from $1.2 million (35 cents a share) to $1.3 million (41 cents).

Settlements for the homebuilding firm rose 20 percent from $44.4 million to $53.1 million.

"In an overall difficult economic environment there is still a strong demand for housing," said Ryland Chairman James P. Ryan. "Our greatest emphasis for the balance of the year will be directed to developing effective ways to deal with the current mortgage market."

Union Trust Bancorp, holding company for the $925 million-deposit Union Trust Co. of Maryland, posted a decline in net income to $1.8 million (74 cents a share) from $2.1 million (85 cents).

Union Trust Chairman J. Stevenson Peck attributed the earnings decline to higher costs of funds. Total deposits on March 31 increased 7.5 percent to $64 million, and loans rose 10.9 percent to $829 million, Peck said.