A few weeks ago, people here saw an unusaul real life drama on the television news. City engineers had determined that a huge boulder on St. John Hill, the site of one of Rio's many mountainside shantytowns, was in danger of slipping, and that all the slum dwellings around it would have to be removed.

A poor, black resident of the area watched helplessly as a municipal wrecking crew demolished his humble wooden shack.

"What will I do now?" the man sobbed, as a TV reporter showed a microphone toward his face. "Where will I go? It took me two years to get the money to build that house. It was all I had."

This was an unexpected glimpse of the dark side of Brazilian reality. Television stations, closely scrutinized by the tough rightist military regime here, tend to run only "positive" news. The film focussed public attention on Rio's worsening slum problem and on the "forgotten" people we live in these miserable human agglomerations.

A slum explosion has occurred here and it is typical of what is happening in much of the rest of Latin America, where record numbers of unskilled rural people are migrating to cities in search of jobs.

Despite high-sounding government promise, Rio's slum population is rapidly increasing. Local authorities say there are now 750,000 to 1 million people living in the shantytowns - roughly 20 per cent of the city's population. In 1960, only 13 per cent of the people in Rio lived in slums. In 1950, the figure was 10 per cent.

Rio's slum problem has been further aggravated by the fact that the Brazilian government seeks development from the top down. The housing problems of the poor have low priority.

Housing officials here are aware of the slums situation, but they have been unable to do anything effective about it.

An ambitious clearance programs, for example, was announced in Rio in the 1960s. Some slums were razed, and their residents transferred to low-cost government housing projects. One such slum to completely disappear from the Rio scene was on Bahlon Hill, with its spectacular view of Sugar Loaf Mountain and the sea, which people all over the world got to know from the movie "Black Orpheus."

But this effort did not accomplish much on a large scale.

A confusing bureaucracy made things slow and difficult. Housing and slum control agencies with acronyms such as CHISAM, CODESCO, COHAB and CEHAB were created and disbanded with each new crop of local officials. The orientation of the program changed frequently and without explanation.

An-initial emphasis on slum clearance was dropped in favor of a scheme to improve existing slums, which, in turn was abandoned.

Then provisional "half way" neighborhoods were built, to receive slum people who were later to move on to permanent housing but the "temporary" centers evolved into permanent slums.

"There has been no defined policy toward slums in Rio," the newspaper O Globe said in an editorial, "and policies that have been announced have not been carried out well."

Another reason for the failure has been that slums people do not like the housing projects of the government has built.

Former slum-dwellers say that their new homes are too far from their old jobs and that they cannot afford the bus and commuter train fares. There are also complaints that public services such as electricity, drinking water, pay phones and police and fire protection are worse in the new housing projects than in the old shantytowns.

A recent study showed that 70 per cent of the slum-dwellers who were moved into the state government-run housing projects in Rio during the past two years wound up going back to their slums.

"I miss my old neighborhood," remarked Mrs. Carmen de Concelcao, who, along with her eight children, was transferred from a hillside shantytown near the beach to a stark, cement-block housing project 40 miles away. Our old shack had more room than this apartment," she said. "And you could see some trees."

Housing officials here feel nevertheless, that the government-housing approach is the proper one.

The idea, they say, to get people out of the hodge-hodge of precarious shanties and put them into organized housing complexes where they can buy their own apartments on low cost government mortgages. This, the officials explains, result in the "social promotion" of slum people and prepares them for entrance into the middle class.

Even if this does work - which many experts in the field doubt - housing projects built and financed by the state government will make only a minor contribution toward solving the slum problem here.

State officials say more than 20,000 low-cost apartments are to be built between now and 1979. This would be an improvement over the 3,000-unit a year average of the past decade, but in the context of a slum population of more than 1 million, it doesn't really amount to much.

There is a consensus among those who have studied the cause of urban slum growth - not only in Rio but throughout Latin America - that no solution can be achieved without finding a way to encourage rural people to stay on farms, and without distributing income more fairly among all sectors of the population.