The long and the short of the Senegalese president's official working visit to Washington goes this way: President Abdou Diouf is long but the Vista Hotel wasn't caught short--barely.

Thanks to some quick footwork, Diouf should be able to stretch out his toes tonight and have an inch of bed to spare. The 48-year-old president is an inch under seven feet tall. The bed is seven feet long.

Last week, the Senegal Embassy staff, charged with the care and feeding of the president while he's here to meet with President Reagan tomorrow, came to inspect the Vista facilities. Emil Senghor, a counselor, took one look at the luxury hotel's standard king-size bed, a spacious but normal 6 feet 8 inches long and 6 feet 4 inches wide, and shook his head. "Not long enough for the president," he said. The width, he said, was no problem. "The president is thin."

Senghor remembered that when Diouf was prime minister, an extra-long bed had to be ordered for the official mansion. When he became president in 1980 the bed went with him to the presidential residence. The problems of beds abroad hadn't come up until this, Diouf's first official trip outside his country since he was returned to office in February.

Donna Di Felice, the Vista purchasing manager, telephoned around trying to find a 90-inch-long bed. Finally she settled for a seven-foot-long, 6-foot-6-inch-wide bed, the largest that could be made at the last moment by The Adjustable Bed Co.

The presidential bed, said Joanne Schatz, president of Adjustable Bed, also has a built-in massager (with a timer and intensity control). The mattress can be raised and lowered in two places, under the legs and the back.

The presidential suite of the Vista, the entire 12th-floor west wing, already had a 5-by-6-foot Jacuzzi, free flowers, chocolates and ice, continental breakfast, an extra-long bar (of no interest to Diouf, a teetotaling Moslem), six rooms and extra security. The only thing left for Gerald Lavergne, the Vista's rooms manager, to worry about is the complimentary bathrobe: It's One Size Fits All--but does that stretch to 6 feet 11 inches?

A couple of historical footnotes: If the old order still prevailed, wherein official guests stayed at the White House, nobody would've had to scurry around for a bed long enough. In the Lincoln bedroom, the traditional lodging for the male guest of honor, the bed is 8 feet 4 inches long, said Lydia Barker, White House curatorial assistant.

Mary Todd Lincoln, whose husband was 6 feet 4 inches tall, knew the problem well and ordered the bed herself. But she overspent her congressional appropriation and caused a great outpouring of wrath against her in Congress. However, the bed, a great Victorian glory, and the rest of its ornate suite still remain in the White House.

Even at home, not all presidential beds went to any great length to be accommodating. Thomas Jefferson, at 6 feet 2 1/2 inches, was in particular trouble because his bed was just a half inch longer than he was. Furthermore, the bed was built with a high and rigid footboard. That was all right, said Monticello head guide Eleanor Preston, because, "As did most people of his era, he slept almost sitting up, with piles of pillows at his back."

If the Vista is thinking about getting rid of the bed after Diouf's visit, it should consider a story a few years ago that showed that in presidential elections, the tallest man usually wins.