The late Tex Ritter never quite knew what to expect of his son John.

The cowboy star stepped out of an airplane in Nashville once to find John slumped against the terminal wall, posing as a wino. "Damn it, son." Tex is said to have exclaimed, "I don't know what I'm going to do with you." But then he laughed.

"Dad would laugh at every 15th joke of mine," recalls John. "That would be the one that inspired me."

That inspiration has paid off for John Ritter. He's the star of "Three's Company," the centerpiece of ABC's hot Tuesday night lineup. In its season premiere, "Three's Company" ranked third in the Nielsens, right behind "Charlie's Angels" and "Happy Days." Ritter's character, and the two women who supposedly live with him (though not in sin), may be television's most popular menage a trois since Kukla, Fran and Ollie.

Ritter, 29, is the only person who has been connected with the show since its infancy as a pilot, and some would say he's the only reason to watch it.

It's still hard to know what to expect to him. His behavior in a Beverly Hills restaurant is beatifically bizarre. He makes faces and winks and plunges into falsetto and interrupts serious discourse with sardonic, irrelevant asides. When the sound of applause drifts in from another room, he stands to accept it with a smile and a "John Ritter, 'Three's Company.'"

In TV land, he was already well known as a minister. Not only was he seen regularly as the Rev. Matt Fordwick on "The Waltons," but in a memorable "Mary Tyler Moore Show" he was the pastor who married Ted and Georgette while dressed in tennis clothes. Now, suddenly he's a satyr in a sex farce - a scrubbed-down satyr, to be sure, but the star of a show in which the running motif is sexual misunderstanding.

Ritter doesn't mind most of the scrubbing down. "I don't consider myself sexy. I know my voice sounds like I've got two fingers up my nose. But I've gotten over saying to myself, 'If I was only Robert Redford.'" Pause, "Or, 'If I was only Soupy Sales.'"

Actually it's the Soupy Sales direction in which Ritter wants to move his show. "I'm not interested in Merv Griffin chuckles - things that are so amuuusing - and I also don't like really raunchy jokes." Ritter guffaws to demonstrate what he doesn't like. He prefers more innocent belly laughs, Lucy stuff ("even when she makes her face so grotesque," marvels Ritter, "she's so beautiful.") "Visual bits. Action - that's what I like," says Ritter.

So he throws popcorn and juggles eggs. When he appeared in "Marat-Sade" as a University of Souther California drama student, "I was the guy who drooled." And when he is told to act lecherous on "Three's Company," he turns it into a joke. "It's a game; and once I play it as a game, it's fun," says Ritter. He regards his show as somewhat similar to the game shows he has appeared on. "Of course we have a hotel on Andrews Place right now because of our ratings. If they drop, we go to jail."

It's true. Pure froth can go down the drain fast. Ritter, giving his show about two years, acknowledges the filmsiness of its premise - sex on the brain but never in the flesh - and observes that "if these 30-year-old kids live together long enough, something is bound to happen. Wild Mazola parties, or something."

He says he had "a long conversation with the writers, asking if I'm virgin or can I get a little on the side." They'll try. Ritter doesn't think much of the ABC censors: "They would not be the first people I would invite to a slumber party."

Still, he's manifestly enjoying himself. And he says the show is improving as it goes along. When it began last spring, Ritter was supposed to be attracted to his blonde roommate but not the brunette. This didn't seem natural to Ritter, and it has been changed. Ritter has never lived in a "Three's Company" situation - he's getting married on Oct. 16 - but he says his best (male) friend lives platonically with two women right now.

Ritter himself has lived in what sounds like an all-American fantasy for much of his life. His parents, Tex Ritter and Dorothy Fay, literally rode off into the sunset together in "Rainbow Over the Range," and Tex would frequently wear his movie clothes around the house, John would go out on the road with his dad's concer tours, and he had already directed a film - a "Bonanza" parody called "Bananas" - when he was hardly a teen-ager.

"I wanted to be President of the United States," he recalls, and he was elected student-body president of Hollywood High School. "I wanted to be junior senator from California by the time I was 35," but at USC something went wrong. "I couldn't take myself seriously for that long. I realized I wasn't all sewed up mentally."

He remained interested in politics - the antiwar kind. But when he finally voted, "it was for my father, a Republican in Tennessee." (Tex Ritter was defeated in the primary election of the 1970 Senate race.) And though John and Tex "would always take opposite views on politics," John was proud when his father visited the Nixon White House in December 1973, a month before his death, to present the President with a country-music record. "Anyone who likes my dad is okay with me," says John.

John remembers his father as "painfully honest" and "a great proponent of 'You're not as good as you think you are.'" But there isn't a trace of bitterness in John's voice. He clearly worships both his parents.

Maybe the Ritter men aren't as unalike as they seem. John recalls that Tex had a keen wit when it came to squelching a nightclub heckler and that he actually did a comedy routine for a while with Hank Morton.

"My dad would always make me laugh," remembers John. And every 15th joke that John told, Tex Ritter would laugh back.