LEBANON IS CURSED with a contradiction: It is so good at making do in the midst of war and blood and chaos that its upheavals seem capable of going on forever. Nothing has demonstrated this more than the agonizing violence of last week. And nothing crystallized this paradox for me more than did my last days in Beirut last April.

I lay flat on my back in the American University Hospital with a severe infection. Shells crashed a few blocks away. Hospital staff tried to maintain their routine. I was visited daily by doctors and a white-starched entourage of serious-looking medical students with clipboards who took notes and nodded gravely at me.

All around was barely contained chaos. Crowds milled around the lobby seeking to be admitted. A few days before, armed Shiite fighters in ragtag fatigues had held up hospital staff in the packed intensive-care unit to force them to remove a critically ill man and make room for the ailing father of one of their guerrillas.

Without informing me, my doctor ordered delicate surgery on me one afternoon, then disappeared. When he surfaced again the following day, he explained that he had scheduled the operation and reserved a theater room in my name simply as a ploy to make sure that hospital technicians conducted the tests he had ordered before going off on Easter holiday. He apologized for forgetting to cancel surgery when the results turned out to be negative.

I knew none of this, however, and my alarm rose to genuine panic when I consulted a retired physician I knew who, while soothing and reassuring, did let drop that the two surgeons who were listed to perform the operation were intense professional rivals of long standing.

I had just dashed off a frantic telex to my editors in Washington asking them to get me out of this. Suddenly, a waiter I knew from the Rigoletto, an elegant little Italian restaurant in my neighborhood, burst into my room.

Learning that I was in the hospital, the owner had decided to send up a little surprise. The young waiter balanced a tray of pasta, salad and pastry with one hand and carried a bottle of wine, a wineglass and a corkscrew in the other. He had walked 10 blocks up a steep hill from the seaside restaurant to bring me dinner.

The waiter snapped a starched white cloth over the bedstand and laid out the food. Draping a napkin expertly over his wrist, he dashed a little of the wine into the glass and smiled when I nodded weakly in approval. He then left abruptly, apologizing for not staying around. He had to hurry back to the restaurant. It was getting dark and dangerous on the streets. But he promised someone from the restaurant would be around in the morning to clear away the dishes.

The Lebanese are master improvisers. They even improvised a deceptive semblance of a nation in the calm, glorious three decades after gaining independence from France in 1943.

They take a certain perverse pride in being able to cope -- indeed often to thrive -- under the kind of adversity that would have decimated most of the world's other, far-frailer societies. They bear up against trouble with a certain dignity that is often surreal under the circumstances. They dismiss disaster with a wave of the hand and a one word utterance -- malesh -- "never mind." I always thought of that as the Lebanese national motto.

I never thought that the Lebanese were innately bloodthirsty. Indeed, outside Lebanon they have always worked hard, prospered and lived peacefully. On the west coast of Africa, for decades, they have been the merchant class. In the Persian Gulf, as the oil states modernized, they and the Palestinians formed the core of the professional class. In America, they have distinguished themselves in many professions.

Rather, there is a perverse reason for the kind of confused slaughter that reigned last week -- with shells from Druze highlands landing on Shiites who were warring with Palestinians. It is that the Lebanese continue to be supremely confident that whatever they destroy they can quickly rebuild, and in the interim, they can cope.

A joke told by all Lebanese sects and warring clans is that of the 11-year-old boy who has just emigrated with his parents to New York City and is being tested in the neighborhood elementary school.

"What's two and two?" the American schoolteacher asks the boy.

He pauses to think for a moment, then responds, "Are you buying or selling?"

Keen calculation is at the core of the Lebanese psyche, whether it is in matters of trade and finance or war and politics. I recall one of National Security Adviser Robert C. McFarlane's aides arriving at a little epiphany one afternoon. He told a story of how the Americans had tried to replace a large window in the ambassador's residence that had been blown out by shelling. That's how they discovered that a former president of the republic who always responded agreeably to their appeals for national reconciliation had nonetheless put his money on war. He had cornered the market on pane glass -- a lucrative business in a country where windows are constantly being shattered by shelling.

When I arrived in Beirut in January 1983, I discovered that even the poor Shiites, existing in the most miserable of human conditions, displayed the Lebanese national way of coping.

The grand old waterfront hotels on the northern tip of the city had long since been battered beyond recognition and were serving as crude shelter for some of the hundreds of thousands of those poor country folk who had fled to the capital from the crossfire of the long Palestinian-Israeli wars to the south. In these bombed-out shells, there was neither electricity nor running water. Yet a telltale sign of the squatters' presence was the lines of freshly washed clothes hanging out to dry.

Better-off Christians and Sunnis survived in style. In the chic Hamra district nearby, designer boutiques sold the latest in French and Italian fashions by Cacherel, Ted Lapidus, Giorgio Armani and Nino Cerrutti. I was always amused by American and European correspondents based in Cairo and Jerusalem who, when they came to Beirut to cover the war, always brought with them long shopping lists for chocolates, gold, champagne, shoes, etchings and clothes which where either unavailable or prohibitively expensive in their calmer capitals.

There was even a routine to the war. Housewives would often scurry out to do their shopping in the early afternoon because they knew fighting would taper off while the guerrillas ate a big lunch. And everyone knew there would always be at least one day late in the month when hostilities ceased -- payday.

If Lebanon is unfathomable and bruising for outsiders like Israel and the United States, it is not because there are no rules to the game there. Rather, I believe, it is because behind the Western veneer, the democratic institutions, there were social arrangements that stood our understanding of logic on its head.

In a nation of religious minorities vying for position in a violent, volatile atmosphere, one such rule is that in weakness there is strength; the corollary of this is that to be temporarily strong and dominant is to be in a very precarious situation -- others inevitably band together against you.

Ariel Sharon failed to understand this when he attempted to rewrite the political map of Lebanon. Israelis still bemoan the assassination of their chosen leader of Lebanon -- Bashir Gemayel -- as if it were a cruel accident of history that shattered their dreams for their unruly northern neighbor. They still do not see it as the perhaps-inevitable outcome of their efforts to change the cardinal rules of the game.

The Shiites, the dominant force in the capital now, understand the dynamic all too well, although they are at a loss to figure out how to get out of their current predicament of superiority. Although they appear to have prevailed in their battles to keep the PLO from establishing itself in Beirut, they are painfully aware that their successes in combat have come at the price of depicting them as the heavy, setting them up for similar counter-treatment later on.

When Lebanon has worked -- which has not been for the last 10 years -- it has not done so because of any consensus on national purpose, says Jamil Mroue, editor of the English-language Beirut Daily Star. All the equilibrium has meant is that opposing forces have been delicately balanced, and a consensus has been reached on the rules for conducting business.

This favored style of dealing is universally known as "the Lebanese solution."

The National Geographic, on a reporting trip to Lebanon in the late 1960s as the fragile calm began to fall apart, identified an almost-classic example. Commenting on "transactions of such complexity and boldness as to give pause to even the most audacious of entrepreneurs," the author wrote:

"Consider, for example, the Lebanese trader who sold some French-made pianos to a Brazilian merchant, accepting a shipment of peanuts from Senegal as payment. He then sold the peanuts to a German firm with the stipulation that he be paid in U.S. dollars."

The Lebanese are fond of these jerry-built arrangements and especially revel in ones with hidden built-in parts. One of the less complex of these I encountered in the time I was covering Lebanon was the deal struck between the Christian commanders of the U.S.-built Lebanese army and the brigade of Moslem soldiers that revolted against that command and refused to submit to their orders, deciding instead to submit to the control of the Shiite Moslem militia, Amal.

Akaf Haidar, one of the leaders of the Amal militia, confided to me one day that once the impoverished militia had gained control of the army brigade, they were faced with the problem of paying, feeding and arming it. Their solution was to request provisions from the Christian commanders against whom the brigade was in revolt.

Not surprisingly, the Christian commanders initially refused. Then, Haidar said, militia leaders reminded them that the Lebanese Central Bank, keeper of the national assets, was in the area controlled by the rebels and, if forced to do so, they could seize it. The Christian commanders relented and the deal was struck to allow paymasters and supply trucks through confrontation lines.

If the Lebanese are good at concocting these kinds of arrangements, they never seem to exhibit any patience with the kind of drudgery and detail involved in the profitless art of governing.

Ministries were often filthy and disorganized, in contrast to the impeccable cleanliness and efficiency of private offices. Corruption was brazen and rampant. I'll always remember the clerk who demanded a $50 bribe to process my application for a work permit. Seeking sympathy, he explained that he had plowed all his savings into a little gift shop, but because of the war, business was poor. "All I have is what I take from the ministry," he sighed sadly.

A senior French diplomat with experience in Lebanon dating back to the colonial mandate recalled how after three full decades of independence, Lebanese bureaucrats still shuttled between Beirut and Paris, seeking help from their former rulers in trying to lay out a public transportation system. The tedium of seeking bids for buses and conducting the population studies necessary to establish routes and schedules proved too exasperating for the Lebanese, he said. On one occasion, they threw up their hands, appealing to the French, "You do it."

At some point, the Western observer begins to wonder how long the chaos apparent in the violence last week can continue without all semblance of societal organization completely falling apart. I came to believe that the bulwark against total anarchy is the unshakeable extended family. But I also came to conclude that that, ironically, allows the madness to continue.

For example, Kamal Salibi, Lebanon's principal modern historian, had his own technique for handling any trouble from the gun- toting teen-age militiamen roaming around his pleasant old stone house in west Beirut. He would go tell their fathers or their mothers. However threatening they might be out on the sidewalks, in the evenings they were around the dinner table at home, unquestioningly under the thumb of their parents.

In Lebanese homes, I always found a surprising serenity, ceremony and hospitality -- whether they were the elegant Italianate mansions of the old Christian trader families in east Beirut or the tin-roofed cinderblock shelters in the squatters slums of the Shiites. Always there was at the very least coffee, cigarettes on the table -- most often Marlboros -- and very often bowls of chocolate wrapped in shiny foil.

This was such a contrast to the chaos outside. During February and March of last year, four NATO armies were being driven out of Lebanon. Yet a small celebration was being held in the seaside apartment house where I lived. A baby boy had been born to the son and daughter-in-law of my genteel, retired landlords. Following village custom, they kept a vigil for the first 40 days of the infant's life, baking cookies and other sweets and distributing them to friends. The doctor expressed large disappointment that I was never home to partake in the celebration.

It seemed another of Lebanon's paradoxes: while family and clan was the ultimate protection against the degeneration of the long fighting into total anarchy, it is also the unit of society that most stood in the way of nationhood. There is an old Arab proverb, "My brother and I against our cousin; my cousin and I against the alien."

Families celebrate the death of their combatants. The funerals of young partisans, Christian and Moslem both, slain on the battlefield, are called their weddings. The women wear white and dance with frenzy.

Yet last week's violence may be showing that even clan ties are disintegrating. Before I left, a bearded young student in the Islamic fundamentalism movement in Tripoli told me how he had friends on both sides of the Palestinian battles there. "My friends are killing my friends," he said. "It's crazy."

But then again, the long war has created such contradictions that I doubt the Lebanese themselves any longer have any idea what the fight is all about.

Once, talking to a Lebanese, I remarked without long consideration

that I was never quite able to satisfactorily resolve how a people with so great a love for the pleasures of life showed such scant respect for the sanctity of it.

That riddle still puzzles me although I believe a part of the answer lies in the tendency of virtually all Lebanese never to accept responsibility themselves for their troubles but to blame always whatever outsider was present in the country at the time.

Selim Hoss, one of the more thoughtful of Lebanon's former prime ministers, once lamented that the war had gone on so long, the piles of scores to settle were so high that only the forceful intervention of an outside referee can separate the warring forces and begin the process of defusing the conflict.

"We are all parties to the conflict," he lamented. "I'm a party to the conflict."

I frankly do not believe that there is any hope of ever resolving all of the grievances created by the long war. Syria, Lebanon's neighbor, certainly understands the Lebanese game far better than the Israelis, Americans or Europeans ever did. But I am skeptical of their ability to separate all the "parties to the conflict" even if they were to become so well-intentioned.

Of one thing I am certain, however, and that's that no one will be able to subdue the Lebanese by force. My friend Ghassan Salameh, a college political science professor, always expressed a strong distaste for guns. But one night he mentioned how he, like every Lebanese boy for centuries, had learned by the age of 11 how to hide weapons from the conqueror. One method he was taught was to smear the inside of an old inner tube with cooking oil, wrap it tightly around the weapon and bury it deep. A good place was the flower garden out back, where it would be preserved for years. To remember where it had been hidden, the lesson was to plant flowers on top, different enough from the other flowers to be remembered but not so different as to attract the attention of the alien.

The Lebanese express pride in their rebellions and tell their children of how they have shrugged off occupiers that, over the centuries, have included the Assyrians, Babylonians, Persians, Greeks, Romans, Arabs, Ottomans and the French.

In fact, there is an old saying of which they are fond: "We Lebanese are easy to swallow but hard to digest."