Sol Weinstein, a comedy writer who penned episodes of “The Jeffersons,” “Three’s Company” and “The Love Boat” and also composed Bobby Darin’s hit song “The Curtain Falls,” died of pancreatic cancer in Wellington, N.Z., on Nov. 25. He was 84.

Weinstein also wrote gags for Bob Hope and Dean Martin variety specials, was a writer for David Frost’s “That Was the Year That Was” and penned episodes of “Maude,” “Chico and the Man” and “Small Wonder.”

During the 1960s Weinstein wrote a series of comic novels satirizing James Bond, the first of which was called “Loxfinger.”

Darin song “The Curtain Falls” was used in Kevin Spacey’s 2004 biopic of the singer, “Beyond the Sea.”

Weinstein was born in the Bronx but the family moved to Los Angeles when he sought to become a writer for television. He attended NYU and wrote for comedians including Joe E. Lewis.

Late in life he moved to New Zealand, to which his son David had relocated.

In addition to David, Weinstein is survived by his daughter, Judee.