Virginia Gov. Charles S. Robb said the state ended fiscal 1985 in June with a $47.1 million surplus, but he warned that growing federal budget and trade deficits foretell economic uncertainty.

"I am reluctant to express unqualified optimism about our fiscal situation," he told a joint meeting of the Senate and House finance committees and the House Appropriations Committee.

Even so, Robb said the state will be able to pay its share of local school aid without raising taxes during the coming biennium.

"So there is no mistake, I might add we intend to fully fund the standards of quality without a general tax increase," he told the legislators.

Robb, who leaves office in January, said the funding plan will be outlined in the final proposed budget of his term.

Budget officials have said they are not certain how the state can meet Robb's full funding goal and the issue has divided Democrat Gerald L. Baliles and Republican Wyatt B. Durrette, who are campaigning to succeed Robb. Baliles, a former attorney general, supports Robb on the school aid question, and Durrette says he is uncertain how much the state should spend on schools.

Robb has won record increases in school aid since taking office in 1982, but the state has consistently failed to pay its full share of the so-called "standards of quality."

The standards of quality are the minimum academic standards established by the state for localities. The standards are mandated by the Constitution of Virginia.

With the expected surplus of $25.3 million for fiscal 1985-86, Robb said, the General Assembly may have an additional $72.4 million to put into the 1986-1988 general fund budget.

But even with that surplus, he said, projected revenues fall below projected general fund expenditures during the next budget period by $116.6 million.

Robb said he is "troubled by inaction and uncertainty on several fronts." He said spending cuts proposed by Congress will not be sufficient to reverse the escalating federal budget deficit, let alone eliminate it.

"The federal budget deficit still looms as our number one national problem," Robb said. He also said a skyrocketing U.S. trade deficit "has potential effects on the economy that could be devastating."

Robb said he was concerned about the disappointing summer performance of retail sales and housing starts and predictions that fall activity in those areas will be sluggish.

"Even the nation's top economists seem to be singing from the same sheet of music, and the tune is 'economic uncertainty,' " he said.

The governor said that while the state budget surplus may seem sizable to some, it is small compared with the many demands that will be placed on it.

The governor said the state will also have to cope with a further reduction in federal funds coming to Virginia and with meeting the requirements of a federal court decision earlier this year bringing state government workers under the overtime provisions of federal law.

Robb said that despite some dark economic clouds on the horizon, Virginia's financial health remains good. "Virginia state government continues to be a model of fiscal responsibility and sound management practices," he said.