In early 1979, Hungarian planners poring over the country's financial results for the previous year were stunned by what they saw. Hungary had paid out$1 billion more dollars, marks and other Western currencies than it had taken in. If this continued, they realized, the country's foreign-exchange reserves would dwindle to nothing, and it might have trouble paying back the $7 billion it owed its foreign bankers.

"We were the first to say 'enough is enough,' " said a Hungarian banker.

The government tightened belts by raising prices of meat, sugar and other basics, and redoubled efforts to export food and machinery.

But more significantly, the planners dusted off an economic reform that had been shelved in the early 1970s. It was designed to loosen up the bureaucratic communist economy and help it perform more efficiently--even if that meant importing capitalist innovations.

Since then, Hungary has passed a law that allows budding entrepreneurs such as building contractors or computer programmers to set up their own small private businesses. It has broken up several of the giant trusts, such as the coal trust, that once exercised central control over whole sectors of industry. It has threatened to shut down enterprises that fail to show a profit, and officials have even begun to talk about introducing a stock or bond market where promising industries could raise capital.

By the end of last year, Hungary's $1 billion trade deficit had been eliminated and it was running a slight surplus in its convertible currency accounts.

What has happened in Hungary is an example of the adjustments that all Eastern European countries are being forced to consider because of their burgeoning debt to the West and stagnating economies. Most of the communist governments, with the exception of hard-line Romania, are becoming more open to changes and reforms in their economies:

East Germany has adopted what Western analysts describe as a modified "Japanese economic model." The economy, although it remains centrally planned, is tuned to emphasize investment in sectors with export potential such as quality steel, color television, microelectronics and diesel trucks.

Bulgaria, the Kremlin's most loyal ally in the Soviet Bloc, introduced a seven-point "New Economic Mechanism" at the start of the year emphasizing cost effectiveness and balance-sheet results rather than the filling of arbitrary quotas.

In Czechoslovakia, a recent article in the journal of the Czechoslovak Academy of Science stressed the need to "surmount diehard views, vestiges, ossification and dogma" to improve the economy. The article surprised Eastern European analysts particularly because its author, Vaclav Kves, was an economist usually considered conservative. The Prague government officially has shown little interest in reforms, but reportedly has told citizens that they can engage in private agriculture.

Poland's future economic course remains a question, given the uncertainty over the role of the independent union Solidarity. Western analysts believe, however, that a law passed in March represents a concession to the realities of modern agriculture. It increased the maximum amount of land that private farmers can own from 50 acres to 240 acres--a size considered necessary for efficient production.

In Eastern European politics, much more is involved in economic reforms than the technicalities of getting more eggs from communist chickens or relieving incompetent factory managers. Extensive economic reforms on the Hungarian model pose political risks for entrenched communist power structures. They imply a willingness to tolerate a more decentralized, disorderly system in which economic decisions are made by thousands of factory managers, small-scale entrepreneurs and farmers, not just by a few party officials and bureaucrats.

"The view in the West seems to be that the major impediment to reform in Eastern Europe is the Soviet Union," says Edwin Hewett, Brookings Institution economist. "The Soviets do set priorities, but right now they are very loose. The biggest obstacles to reform have always been internal. They are the vested interests: labor unions, managers and others. They may be for reform as a concept, but they don't like what it means for them personally."

Hungary's aim is to unleash capitalist energies and provide new incentives without creating a new class of capitalists, a balancing act that officials admit is a tricky one.

"We don't want to create a new class that lives off capital, because in that case we would have capitalism," said Deputy Director of Planning Janos Hoos. But he said that there were no apparent rules against one socialist enterprise, or cooperative, floating stocks or bonds for sale to other socialist companies.

At the same time, even modest concessions to economic reality can sharply raise the level of social tensons.

The Polish government's food price increases of 1970, for instance--an attempt to bring heavily subsidized prices into line with the real cost of the food--set off the riots that overthrew Poland's party chief Wladyslaw Gomulka. Similar price increases in 1980 led to demonstrations and the birth of Solidarity.

As a result, caution has been the rule for the communist leaderships in the area, and their longevity in power is a marvel by Western standards. Except in Poland and Yugoslavia, the current national leaders have been in power for more than 10 years, and Bulgaria's Todor Zhivkov has survived since 1954.

But Western experts suggest that the economic crisis facing Eastern European countries has become so severe that governments have reached a turning point where leaderships must decide between reforms or a period of brutal austerity.

During the last decade, easy access to Western loans made it possible for these countries to import technology and food while postponing tough economic decisions. Now, it appears, a day of reckoning has come. The total debt of the Soviet Union and its six Eastern European allies stood at $53.8 billion last September, and nonaligned but communist Yugoslavia owed another$9.6 billion. Poland and Romania have fallen far behind in their payments and are attempting to refinance their obligations.

Meanwhile, economic growth has slowed. Poland's national income fell by an estimated 15 percent in 1981, which brought it down to the level attained in 1974. Political unrest was a factor. But the national income of Czechoslovakia, a country that was unperturbed by work stoppages and strikes, grew only 0.2 percent.

Communist officials blame the lagging industrial output on questionable investment decisions in the 1970s. Huge amounts of capital and credit were borrowed from the West to build plants that now seem to have little prospect of earning back the currencies that went into them.

Poland paid 77 million scarce dollars for an ultramodern color television tube plant using RCA technology that has yet to earn a penny of foreign currency. A new Citroen plant in Romania is supposed to export half of its annual production, but that goal now seems highly questionable in light of the worldwide slump in car sales.

These problems are occurring against a background that is vastly different from 1968, when the Soviet Union dominated its satellites' economies. After invading Czechoslovakia that year, the Soviets ordered their allies to strengthen their economic ties with each other.

Today a network of trade, credits, technology and grain connect Eastern Europe to the capitalist West. Polish Deputy Premier Janusz Obodowski has warned that his country would shift its economic ties back to the Soviet Union if more Western credits were not forthcoming, but this alternative does not seem very realistic to Western analysts because of the Soviets' own economic troubles.

Subsidized Soviet oil exports to Eastern Europe will be cut from80 million tons to 70 million tons this year because Soviet oil reserves are declining and Moscow wants to sell more oil to Western Europe for convertible currencies. Eastern European countries have been told they can buy more oil--but only for dollars or the equivalent in food and quality equipment.

In Hungary this has been read as a signal to streamline the economy.

"Continuation of reforms is not just an alternative, as it was in 1968. It is a . . . necessity," says economist Rezso Nyers, a member of the Hungarian Central Committee and an architect of the reforms that finally are being introduced.

The Planning Ministry's Hoos and other Hungarian officials speak with cautious approval of the ideas of Tibor Liska, a "radical" economist by Eastern European standards who favors a free market, free trade and the scrapping of the centrally planned economy in favor of one operated by "socialist entrepreneurs."

In Hungary the government is the only shareholder in most industries and enterprises. Liska proposes that the government auction off leases on these enterprises to entrepreneurs who could manage them and profit from them until they were outbid by another group.

Liska's ideas have been put into practice on a small scale. Last year the government began auctioning off leases on unprofitable restaurants and small businesses. Hoos says the government "welcomes" discussion of Liska's ideas, but he has serious reservations about extending such a plan to giant factories and industries with thousands of employes.

"It is one thing if a small enterprise is run into bankruptcy," said Hoos. "But when you are dealing with an enterprise with 10,000 employes and huge amounts of capital, then the state has to have more guarantees about its financial stability."

Another thorny question involves employment policy. Hungary has a labor shortage, but under the system's guarantee of full employment some enterprise managers have more workers than they need. This excess labor cuts into profits unfairly, in Hoos' view.

"In a socialist society it is the task of the state--but not of the individual enterprise--to provide full employment," he said.

The government is already moving against excessive centralization. Andrea Deak of the Ministry of Industry related how the centralized coal trust was broken up last year into eight separate coal companies.

"It was difficult for the leaders of the trust to retire, or to be sent to different coal mines," said Deak. But the decentralization was necessary, he said, to shift financial accountability down to the level of each mine.

In Eastern Europe, only Romania has made a point of openly rejecting Hungarian-style economic reforms.

Under pressure from the International Monetary Fund, Romania has established a slightly more realistic exchange rate and raised some prices closer to world levels. Overall, however, lacking the political opposition of the kind that shook Poland, Romania has responded to its economic troubles with a ruthless cutback in imports and a reduction in the standard of living.