LONDON, Sept. 18--Sean O'Casey, the Irish playwright, died tonight of a heart attack in Torquay. He was 84 years old. He had lived in the resort town on the southwest coast of England for many years. The dramatist, long an exile from his native Ireland, died at about 7 P.M., shortly after he was taken to a nursing home. His body will be cremated and details of funeral arrangements will be announced tomorrow. From the bitterness of poverty and from the love of humanity Sean O'Casey created works of drama and prose-poetry that sang of freedom's exuberance and reviled spiritual penury. From earliest days in the drab streets and two-story brick boxes of Dublin slums until his aging years of self-driven British exile amid the red earth and salt air of Torquay, this gaunt fiery writer never abandoned his faith in the dignity of man. For his cause, he spurned neither fight or embrace. But like the tumultuous, passionate sentences that swirled and plunged through his plays, essays, letters and autobiographical works, he was more concerned with poetry than logic; more with shoulder-heaving laughter than with back-bending research. Even in his 80's, looking very much the poor country vicar with his worn tweed jacket, pipe, white hair, ascetic face and steel-rimmed glasses, Mr. O'Casey continued to call out as hotly as ever to young writers not to be "afraid of life's full-throated shouting, afraid of its venom, suspicious of its gentleness, its valor, its pain and its rowdiness." By then, the man whose plays had touched off riots, whose diatribes had nettled churchmen and atheists, was nearly blind. Still he sought out the restless vigor of the young and enjoyed the laughter and rows of pub and street. "The artist's life," he advised, "is to be where life is, active life, found in neither ivory tower nor concrete shelter; he must be out listening to everything, looking at everything, and thinking it all out afterward." There were many, even among his most ardent admirers, who consistently questioned the infallibility of the O'Casey gift for reason. They would chide him, for instance, for his continued support of the Soviet Union, pointing out that his passion for personal liberty was irreconcilable with the tyranny of the Kremlin. Stubbornly, though, he clung to his belief, dismissing derogatory information as propaganda. Actually, he was quite hazy about political ideologies. Once, for example, in the early 1950's, he told an American visitor that there were "many millions of Communists in the United States." He explained that President Franklin Delano Roosevelt and all who voted for him were Communists. A Communist, said the writer, "is anyone who tries to help humanity." Sharp Characterization But even those who quarreled with what Mr. O'Casey wrote did not doubt the beauty of his prose. Thus, though his internationally famous plays--"The Shadow of a Gunman," "The Plough and the Stars," "Juno and the Paycock" and "Within the Gates"--stirred up storms among spectators and critics, they were read long afterward by many thousands throughout the English-speaking world for their magnificent lines, their sharp characterization and their robust humor. Critics sometimes quibbled about the form of Mr. O'Casey's works, particularly the symbolism of such plays as "Within the Gates," "Cock-a-Doodle Dandy" and "Purple Dust." But they were overwhelmed by the eloquence, imagery and fire of Mr. O'Casey's writings, particularly in his six autobiographical books that emerged from 1939 to 1955 under the titles of "I Knock at the Door," "Pictures in the Hallway," "Drums Under the Window," "Inishfallen Fare Thee Well," "Rose and Crown" and "Sunset and Evening Star." One critic called the O'Casey style "a great and lovely tide of rhetoric." Mr. O'Casey said his works and arguments had made him "tattered and torn, like a man tossed by the cow with the crumpled horn, but still sparing for defense and a forward blow." Some who had never felt the searing insult of Mr. O'Casey's anger talked warmly of his gentleness, of the soft, lyric brogue that made him, on Broadway or the West End, always a part of Dublin's O'Connell Street. His friends roared as he would recall the pranks of childhood or describe a weekend at Lady Astor's, "feeding off solid silver and sleeping in a room like a stadium." But for those Mr. O'Casey disliked, he showed another side. Of one man, for instance, he wrote: "He was a pathetic figure, when he talked to one, speckled one's cheeks with spittle, a prying index finger every moment prodding behind a collar a size too large for his neck, seeking something disturbing the upper part of his back; forever adding a spate of useless words to his monstrous diary, given at last to the National Library, when it should have been given to the fire." Attacked Catholic Church Mr. O'Casey not only took on individuals but also groups in his verbal brawls. He called atheists "those who, trying to get rid of God, plant Him more firmly on His throne." And evangelists, he said, were "those preachers who daub the glories of God with mockeries." Though he was fairly general in his resentment of organized religion, he singled out the Roman Catholic Church for special attacks. The importance of his target was just another challenge. He accused George Russell ("A.E."), one of the most influential Irish journalists, of "hopabout, runaway intellectual agitation; a congested mass of nonsense is your nut." Though he almost lost his life in the struggle for Irish freedom, Mr. O'Casey said of the first Irish President, Eamon de Valera: "There seemed to be no sound of Irish wind, water, folkchant or birdsong in the dry, dull voice." He was particularly savage in assaulting literary ideas he found offensive. Thus, in the early 1930's, when realistic approaches to drama found general favor, he wrote: "The beauty, fire and poetry of drama have perished in a storm of fake realisms. Let real birds fly through the air; real animals roam through the jungle, real fish swim in the sea, but let us have art in the theater. There is a deeper life than the life we see and hear with the open ear and the open eye and this is the life important and the life everlasting. So to hell with so-called realism, for it leads nowhere." Mr. O'Casey's hard path began almost at his birth in Dublin on March 30, 1880. When he was a child, his father died. His eyes were bad and his teachers, by his accounts, had a strong sense of sadism. His brother and sister died when still young. At the age of 14, he went to work as a laborer. Humiliated by poverty, a Protestant rebel in a Catholic city, his great solace was literature. He would steal books. His love for Shakespeare was one of the forces that drove him to write for the theater. Between 12-hour days at manual labor and nights of plotting Irish rebellion, Mr. O'Casey sampled a good deal of the hunger, anguish and ferocity of the poor of Dublin. At one point, when a charity patient in a hospital, his most vivid memory was that the food was so much better than his usual repasts. After some strong tastes of amateur theatricals the young man decided that writing was the way to express what he had seen, heard and thought of the world. The Abbey Theater, after turning down a few plays, accepted "The Shadow of a Gunman" in 1925. There was some resentment in the audience toward the play, even more toward "Juno and the Paycock." And when "The Plough and the Stars" opened there in 1926 a riot broke out. But, amid demonstrations and uproar, the play, though interrupted, was finished with what one correspondent described as the "greatest ovation" at that theater. Driven From Ireland By that time, however, the O'Casey penchant for argument had driven him not only from the Abbey Theater but also from Ireland. The board of the theater had refused to do his "The Silver Tassle." In his fury the author berated even W. B. Yeats, a member of the board and a man he greatly respected. Mr. O'Casey never returned to Ireland, though he often became homesick. London, however, lionized the playwright and even tolerated his foibles. He refused, for example, to wear a dinner jacket, preferring his turtle-neck sweater. A dinner jacket, he said, was fit only for the coffin. He wore the sweater even for his church wedding in London in 1927 to Eileen Reynolds. She was an Irish actress who used the name Carey. They had two sons and a daughter. Mr. O'Casey, despite his enormous reputation, earned very little money either from his plays or his books. An O'Casey Revival In 1956 something of an O'Casey revival began in New York. Paul Shyre, a young actor and writer, wrote and produced adaptations of the O'Casey autobiographies and lesser-known plays. His "I Knock at the Door," done in readings on a bare stage, was a hit both on and off Broadway in 1956 and 1957. He achieved a similar success with "Pictures in the Hallway" in 1956. "Purple Dust" ran for 480 performances during 1957 at the Cherry Lane Theater in Greenwich Village. "Red Roses for Me" in January, 1956, was a sell-out. A musical version of "Juno and the Paycock," written by Marc Blitzstein, was prepared during 1958. Mr. O'Casey's "Drums of Father Ned" was one of the plays selected by the Dublin Theater Festival for the summer of 1958, but it was withdrawn in May. So was a dramatization of James Joyce's "Ulysses," as well as a play by Samuel Beckett. The Roman Catholic archbishopric in Dublin disapproved of all these, and some other selections. Mr. O'Casey's reaction was typical of him. He banned all his plays from production in any part of the Irish Republic. The ban was in effect the rest of his life, though he did lift it on occasion. Mr. O'Casey explained his feelings behind the ban in an article in The New York Times last Jan. 5. He wrote: "I have lived a troublesome life in Ireland, in my youth hard times in the body, and in my manhood years, a hard time in the spirit. Hardship in my young days taught me how to fight hard, for if that characteristic wasn't developed then, it meant that one became either a slave or a lick-spittle. "So I learned how to resist all aggressive attempts to make me a docile one, and could hit back as hard as he who could hit hardest. This gift (for an earned gift it is) kept within me when I reached the world of thought as it had been in the world of hard labor--at times, I fear, fighting what I thought to be aggression where none was meant. "Indeed, had I been Adam, I think I should have resisted the angel with his sword of flaming fire that drove him and his Eve from the Garden of Eden." Extended the Ban Last month, Mr. O'Casey extended the ban to the Irish Pavilion at the World's Fair, which had requested his permission to play recorded excerpts from his works. Despite failing eyesight, Mr. O'Casey continued to write until his death. Essays poured out of his portable typewriter from his third-floor flat in Torquay. "The worst of it," he said in an interview last month, "is that I can't see the mistakes I type." To ward off drafts in his later years, Mr. O'Casey took to wearing colored skull caps. They became as much a part of his costume as the familiar turtleneck sweater. The title of his last book of essays, published in 1963, was "Under a Colored Cap." Mr. O'Casey died while Metro-Goldwyn-Mayer was filming "Young Cassidy," a movie based on his autobiography. In a sense he wrote his own epitaph in the last of his autobiographical books which he wrote in the third person. "Here," he wrote, "with whitened hair, desires failing,strength ebbing out of him, with the sun gone down, and with only the serenity and calm warning of the evening star left to him, he drank to Life, to all it had been, to what it was, to what it would be. Hurrah!"