Allied Capital Corp. recorded an 88 percent gain in net realized income for the first half of 1982 to $2.2 million ($1.65) from $1.2 million (88 cents) for the comparable period of 1981, company officials said.

Gross revenues declined to $2.97 million from $3.19 million, but decreasing interest rates on the venture capital firm's indebtedness accounted for the income gains.

Among D.C.-based Allied's portfolio companies is Smith Laboratories Inc., which received Food and Drug Administration approval Wednesday for an injectable drug to treat slipped discs.

LogEtronics Inc. of Springfield, a computer services and high-technology firm, said it lost $1.7 million during its third quarter as sales declined and expenditures for research and development increased.

In the comparable period of 1981, LogE earned $269,000 (23 cents a share). Revenues fell 8 percent in the latest quarter to $7.9 million from $8.6 million.

LogE posted a nine-month loss of $1.5 million compared with earnings of $1.7 million (59 cents) in 1981. Revenues were $29 million compared with $24 million.

E.C. Ernst, a D.C. electrical contracting firm, posted second-quarter profits of $22,000 (one cent) a share compared with earnings of $2.2 million (60 cents) last year. For the first half, Ernst earned $127,000 (3 cents) compared with $5.9 million ($1.67) Company officials noted, however, that the year-ago figures included claims from contracts prior to Ernst's filing for protection under Chapter 11 of federal bankruptcy laws.

Contract income was $12.5 million for the latest quarter compared with $12.7 million a year ago, and $25.2 million for nine months compared with $23.8 million .

Fair Lanes Inc., based in Baltimore, recorded profits of $218,000 (4 cents a share) in the first quarter compared with $128,000 (2 cents) last year. Revenues increased to $15.8 million from $14.7 million. The company is adding 3 bowling lanes to its current 89 centers in 19 states.

Doughtie's Foods Inc. of Portsmouth has earned $292,000 (35 cents a share) on sales of $37.2 million in nine months this year compared with $251,000 (30 cents) on sales of $34 million last year. For the third quarter, Doughtie's earned $44,000 (5 cents) on sales of $12.6 million compared with $86,000 (10 cents) on sales of $11.8 million in 1981.

While sales increased 3.4 percent at District-based Waxie Maxie record stores in its fiscal year ended in July, earnings jumped 43 percent to $107,965 (65 cents a share) from $75,426 (37 cents) the year before. Sales were $6.6 million compared with $6.4 million in 1981.