Prices at the wholesale level rose 0.3 percent in July, as the cost of food shot up and gasoline prices declined, the Labor Department reported yesterday.

The rise in last month's Producer Price Index for finished goods followed a 0.2 percent drop in the index in June. For the last 12 months, prices have risen 0.9 percent. However, for the first seven months of the year, wholesale prices have climbed at an annual rate of 1.4 percent.

"We view this as very good news," said White House spokesman Larry Speakes. "There's no sign of pickup in inflation . . . the bottom line is that the recovery continues well in gear. Its cornerstones remain solid growth and low inflation, which have been the objectives of the president's program from the start."

The increase last month was not seen by economists as the beginning of a trend of spiraling prices. One reason for the slight acceleration last month was a jump in food costs, which declined in five of the first six months of this year. Food costs rose 1.3 percent last month as fresh vegetable prices jumped 22.2 percent.

The decline in the dollar ordinarily would lead to higher prices because imported goods would become more expensive. However, economists said that the effect of the dollar's recent decline may not become evident for several months because of lags in price changes. In addition, many foreign producers may cut prices rather than lose market share in the United States, which would help to keep inflation moderate.

Commodity prices are more sensitive to changes in the dollar, but so far the dollar's decline has not yet been reflected in their costs, economists said.

The increase in food prices is "interesting, but it comes after so many months of weak agricultural prices that it's hard to believe there's a real change there," said Alan Murray, an economist with Citicorp Information Services.

The 0.2 percent decline in the overall index in June is just as significant as the 0.3 percent increase in July, Murray said. The two added together "is a very slow increase," Murray said.

The index for finished goods was 294.8 in July, meaning that goods that cost $10 in 1967 cost $29.48 last month. The July increase was the largest since the index rose 0.4 percent in April, which had been the largest this year.

Many economists said they expected inflation to remain modest, with prices at the wholesale level running at an annual rate of about 2.5 percent for the rest of the year.

Price rises should remain moderate because wage gains have been slow, oil prices are weak and there is plenty of room for factories to increase production without causing inflationary shortages or bottlenecks. On the negative side are the falling dollar, the possibility of strong growth in the money supply and the inability of Congress to reduce the federal budget deficits, which keep interest rates high and in turn increase costs of goods.

Prices for finished consumer goods rose 0.4 percent last month, following a 0.4 percent decline in June. The index for consumer foods rose 1.3 percent after falling throughout the first half of the year, Labor said.

Prices rose sharply for fresh vegetables, pork, fish and eggs. Roasted coffee and milled rice prices also increased.

Prices fell for beef, veal and processed poultry after increasing in June. Costs of dairy products, processed fruits and vegetables and confectionery products also declined.

The index for capital equipment was unchanged last month following a 0.4 percent increase in June. Prices rose for trucks, aircraft, commercial furniture, food products machinery and chemical industry machinery.

The index for intermediate goods -- products with some processing -- dropped 0.3 percent in July, reaching its lowest level since the beginning of 1984, the Labor Department said. The index declined 0.4 percent in June.

For the second consecutive month, the index for intermediate energy goods dropped sharply. Prices for diesel fuel fell the most, Labor said.

Crude material prices, reflecting prices of raw goods, dropped 0.6 percent in July, following a similar drop in June. Crude goods prices so far have declined an average 1.2 percent this year.

Prices of feedstuffs fell more in July than in June, and energy prices had smaller declines. Prices for cattle, corn, raw cane sugar and soybeans declined more in July than in June. Prices for live poultry, wheat, fresh fruits, cocoa beans and hay declined following rises in June.

The costs of hogs, fresh vegetables and unprocessed fish jumped substantially, the Labor Department said.

Additionally, for the first time, the Labor Department eliminated the one-month lag in reporting indices for refined petroleum products. The Labor Department also said it will use new seasonal factors in adjusting prices for the rest of the year.

The Labor Department said that the elimination of the one-month lag in reporting refinery goods products, beginning in June, would have changed the finished goods index from no change in June to a decline of 0.2 percent. The index for finished energy goods, originally published as a 2 percent decline, was revised to a 3.3 percent decline.