The voice was a little huskier, the color a little pale, the walk a trifle slow, but President Reagan's surgery for cancer hadn't dulled his fondness for getting off a good line.

"He told me," Reagan said of China's President Li Xiannian, "that once I was totally back on my feet, a young man like myself could expect to have a long and distinguished career ahead of me."

In his toast to Li at last night's state dinner Reagan, making his first social appearance since he got out of Bethesda Naval Hospital, told guests that the Chinese leader "comes from a nation whose people are known for their traditional respect for elders. President Li, I can assure you, I'm doing my best to reestablish that tradition in my own country."

The 74-year-old American president even had a handy phrase for the 76-year-old Chinese president: "lao pengyou." Or, as Reagan translated "for those of you who don't speak Chinese, that means 'old friend.' "

The guests, who included Elizabeth Taylor, Olympic gold medal gymnast Mary Lou Retton and architect I.M. Pei, greeted Reagan with prolonged applause when he rose to make his toast. He was obviously pleased and said, "I don't think I can do that for every state dinner."

Reagan's role in the largely ceremonial evening was scaled down considerably. He and Nancy Reagan, wearing a traditional Chinese dress given to her by Li's wife, Lin Jiamei, did appear as usual on the North Portico to welcome Li and Lin. A small army of photographers and reporters was waiting.

When someone called out asking how his day had gone, Reagan replied, "Just fine."

"It's not too much for you?" another reporter asked.

"What?" Reagan said, putting his hand to his ear.

"No," answered a smiling Mrs. Reagan, wearing the red satin brocade cheongsam given her last year in Peking by President Li and his wife, Lin.

When Li arrived he steadied himself with a hand on the door, and an aide stood at his elbow. Li walked up the stairs slowly, with his wife following close behind, her hand barely touching his back.

But after the arrivals, the dinner broke away from the usual schedule. There was no receiving line, no "photo opportunity" on the Grand Staircase, no after-dinner "mix and mingle."

Instead, both Li and Reagan departed immediately after dinner, leaving their wives to join the guests for a concert by soprano Grace Bumbry and bass-baritone Gregg Baker. After the songs, Nancy Reagan saw Lin to the door and then, as the band struck up "Shall We Dance?" joined Secretary of State George Shultz in a swing around the floor.

"He's fine," she said later of her absent husband. "I just have to hold him down."

Even the toasts seemed to have been crafted to spare the two presidents' energy. Instead of providing a translator during Li's remarks to the audience, the White House printed up the text. In his toast, Reagan avoided specifics. Li did not.

"There is no denying that there remain differences between China and the United States," Li said. "I think that on ordinary differences we can reserve our respective opinions without affecting our friendship. As for any major difference, if it is not handled well in accordance with the principles, it will become an obstacle to the development of Sino-U.S. friendly relations.

"What I mean is the question of Taiwan. I hope this question can be resolved in the spirit of the joint communique's and in accordance with commitments each side has undertaken, so that, untrammeled by this question, our two countries may concentrate their efforts on opening new dimensions of Sino-U.S. friendly cooperation."

He also said China hopes to see an improvement of relations between the United States and the Soviet Union and "a drastic cut of their armaments, particularly their nuclear armaments . . ."

Listening to the toasts were about 125 guests, including Vice President Bush, who Reagan announced last night has been invited by the Chinese to pay a visit to their country. Others on hand to greet the president were Robert Mitchum, author John Hersey, longtime friends Earle and Marion Jorgensen, Bonita Granville Wrather, U.S. Information Agency Director Charles Z. Wick and his wife, Mary Jane, and Michael and Carolyn Deaver.

When the former White House deputy chief of staff, who left that job last spring, was asked if he was back in the White House permanently, Deaver laughed and insisted he wasn't.

Taylor arrived late and stopped to talk for a minute with Mitchum. Both had worked with actor Rock Hudson, hospitalized in Paris with liver cancer.

"I've known he hasn't been well for a while," said a subdued Taylor, who wore a turquoise chiffon dress and whose hair was a combination of brown and blond.

"I worked with him," said Mitchum. "I'm sort of devastated by it."

After dinner, Nancy Reagan said of Hudson's illness, "Isn't that a shame?" and remembered that he attended a state dinner several months ago. "He looked very thin then," she said. "He said he'd picked up a bug in Israel."

Some of the guests spent much of their time pursuing Mary Lou Retton, accompanied by her brother Ronnie Jr. Out of uniform in a short, blue sequined dress and blue high heels, she said she had been to the White House before, but this was the "first time" for dinner. It was, doubtless, not the first time beaming adults asked for autographs and bent down low to smile into her smiling face.

At least one guest reminisced about his own experience at the Bethesda Naval Hospital. Sen. Edward Zorinsky (D-Neb.) said a week ago that he never got results of tests performed on him in 1980 -- after he had a colon polyp removed at the Naval hospital -- because the biopsy specimen was lost. Last night he called it "the case of the missing polyp," as he and his wife, Cece, faced reporters, whose inevitable question was whether he would demand an investigation of the Navy's medical facility. Zorinsky shrugged his shoulders, grinned and answered, "They said they lost it, but that 'it looked all right.' "

Navy Secretary John Lehman managed to get past reporters before they could ask him what happened to Zorinsky's polyp.

The White House said no special food had been planned for President Reagan. He and everyone else dined on lobster, tenderloin of veal, summer squash and lime sabayon.

It seemed to be a night for the arts. Also on the guest list were the Washington Ballet's Choo San Goh; the School of American Ballet's Lincoln Kirstein; National Endowment for the Arts chairman Francis S.M. Hodsoll; and the Metropolitan Opera Association's general manager Anthony Bliss.

Bliss said he "was very unhappy" about the Met's plan to discontinue its national tours, "but it was inevitable. In 1974 I knew we had to do it. It was economically impossible to continue under the circumstances. Maybe we will find another way."

Earlier, old China hands and new China hands assembled at Secretary of State George Shultz's luncheon for China's president.

In his toast to Li, Shultz took pointed note of recent changes in China.

"As you know, I once was an economist, and what's happening in China today is an extraordinary historical development," he said.

A Chinese journalist traveling with Li's entourage reduced what's happening in China to even simpler terms: "We wish our people to get rich to improve their standard of living."

Henry Kissinger, whose clandestine flight to China in July 1971 paved the way for resumption of diplomatic relations by the end of the decade, said that governing 1 billion people was a huge task all by itself, let alone adapting "your economic system to one giving more incentives" to the people.

Standing in the Benjamin Franklin Room after the lunch of Maryland crab soup, Virginia game hen with Cumberland sauce, and strawberry ice, Kissinger was a star in his own right as people interrupted to shake his hand.

"No," he said to a question about whether China's modernization means communism is on the way out, "it won't be on the way out. They'll redefine it."

Then, with that familiar Kissingerian chuckle, he added, "In the old Chinese tradition."

Nearby stood Winston Lord, Kissinger's former aide who accompanied him on the first China trip. Kissinger said, "Oh, yeah," he was pleased that President Reagan had nominated Lord to be the next ambassador to the People's Republic, "but don't ruin his career by saying that I am."

Li sat at Helena Shultz's table, where other guests included Kissinger, Supreme Court Justice Sandra Day O'Connor, Sen. Frank Murkowski (R-Alaska), United Technologies' Harry Gray, Weyerhaeuser Co.'s George Weyerhaeuser and Delaware Lt. Gov. S.B. Woo. Earlier, Helena Shultz took the obviously frail Li's hand to lead him to her table, while the military combo played "The Way We Were.