Construction spending rose a moderate 1.2 percent in July, the government reported yesterday, the third increase in the last six months.

The increase brought construction spending to a seasonally adjusted annual rate of $349.5 billion following a 0.6 percent decline in June.

The June drop had originally been reported as a 0.7 percent gain. There frequently are month-to-month revisions in these figures as more accurate data becomes available.

The 1.2 percent increase is the third time in the last six months that new construction has increased. The other increases were 2.8 percent in April and 1.3 percent in May.

Still, new construction was 9.5 percent above its level a year ago, the Commerce Department reported.

During the past year, higher overall construction activity offset a general decline of about 3 percent in new housing, the government said.

Credit for the year-to-year increase in new non-residential construction is generally given to declining interest rates.

Public construction increased by 1.5 percent in July after a 2.4 percent gain in June.

Private construction rose 1.0 percent in July, after a 1.2 percent decline in June.

Construction of single-family homes was up 0.4 percent in July while construction of duplexes and larger apartments rose a strong 5.4 percent.

Construction of non-residential buildings rose 0.9 percent in July, following two monthly declines.

Spending on residential construction has climbed just 1.9 percent this year, compared with a spectacular 24.6 percent for office buildings and 18.4 percent for private non-residential construction of all types, the report said.

Currently, developers can borrow money to build office buildings more cheaply than a potential home owner or residential builder can borrow.

"Even though there is a lot of overbuilt office space, office construction has done very well; they keep making more and more," housing analyst Gopal Ahluwalia said, speaking for the National Association of Home Builders.

"It is probably the tax advantages," he said. "The rate of return and the tax laws are favorable."

Some cities are beginning to make greater use of their glut of new office space because of increasing employment, notably Atlanta, Boston, Tuscon, and Austin, Tex., he said.

Even Houston, often used as an example of a city with a huge surplus of "see-through" vacant office buildings, is beginning to improve as employment diversifies out of the slumping oil industry.

Office building construction, up 3.5 percent in July, has been surprising analysts with its continuing strength, aided by tax breaks developers are anxious to use before tax reform can possibly eliminate them.

Overall, spending on private construction other than housing went up 18.4 percent between July 1984 and July 1985, while construction dollars for private housing has gone up only 1.9 percent in the same period.