GNUCobol中的512字节?

问题描述 投票:-1回答:2

我正在使用带有OpenCobolIDE的GNUCobol编译器我正在创建一个虚拟时间表但是,当我达到174行时,出现此错误:

 source text exceeds 512 bytes, will be truncated

我该怎么办?我必须达到近2000行代码...我该怎么办?非常感谢!

    IDENTIFICATION DIVISION.
PROGRAM-ID.   TIME-MACHINE.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01  INPUT1 PIC 9999.
01  Q PIC X VALUE "Y".
PROCEDURE DIVISION.

TIME-MACHINE SECTION.
           DISPLAY "VIRTUAL TIME MACHINE".
           DISPLAY "CHOOSE AN YEAR (1900-1999)"
           ACCEPT INPUT1
           IF INPUT1 = 1900 GO TO TIME-MACHINE-1900.
           IF INPUT1 = 1901 GO TO TIME-MACHINE-1901.
           IF INPUT1 = 1902 GO TO TIME-MACHINE-1902.
           IF INPUT1 = 1903 GO TO TIME-MACHINE-1903.


TIME-MACHINE-1900 SECTION.
DISPLAY "January 1 January: Nigeria assumes British protectorate status"
DISPLAY "January 2: the first electric bus comes into service in New York City."
DISPLAY "9 January - Rome: foundation of Polisportiva S.S. Lazio"
DISPLAY "13 January: In the Austro-Hungarian Empire an imperial decree establishes German as the official language of the army."
DISPLAY "14 January - Rome: at the Teatro Costanzi before Giacomo Puccini's Tosca"
DISPLAY "January 16: The United Kingdom renounces Samoa in favour of the United States (on the basis of a contract dating back to 1889 and only today ratified by the USA)."
DISPLAY "20 January: death of John Ruskin"
DISPLAY "24 January: the British government starts negotiations with the Boer government to end the conflict that has lasted since 1899."
DISPLAY "27 January: foreign diplomats in Beijing ask the Chinese imperial government to intervene against the xenophobic insurgency taking place in the country."
DISPLAY "February 3: The Democratic nominee for governor of Kentucky is assassinated in the United States."
DISPLAY "February 6: The US Senate ratifies the Hague decision to establish an International Court of Arbitration."
DISPLAY "February 9: The Davis Cup, an 18 kg silver trophy to be awarded in August, is established."
DISPLAY "10 February: During an audience granted by Leo XIII in the Vatican to 3000 Piedmontese pilgrims, none of those present raised the traditional greeting of: <<Long live the Pope King!>>!."
DISPLAY "February 26: In Italy, the opposition accuses the Pelloux government of using the Mafia for the elections"
DISPLAY "27 February: in the Kingdom of Italy a vast flu epidemic causes many victims"
DISPLAY "Bayern Munich is founded"
DISPLAY "In Spain, child labour is prohibited for more than 8 hours during the day, in France the same law applies to women and children, but the time limit is 11 hours."
DISPLAY "6 March: death of Gottlieb Daimler. The German <<father>> of Mercedes was born in 1834."
DISPLAY "13 March - Anglo-Boer war: English troops report a historic victory by occupying Bloemfontein."
DISPLAY "14 March - Rome: in the Parliament Gabriele D'Annunzio goes sensationalally from the right to the left to the much criticized cry: <<I'm going, I'm going towards life!>>".
DISPLAY "15 March - In China boxers destroy the railway line that connected the capital with Tientsin."
DISPLAY "March 16: In Knossos, Arthur Evans finds a Minoan palace."
DISPLAY "24 March: in New York, Mayor Van Wiych begins excavation work on a subway tunnel."
DISPLAY "The Dutch botanist Hugo de Vries identifies the scientific basis of Mendel's laws on heredity. The work of the Bohemian monk is therefore reassessed after 35 years."
DISPLAY "April 1: Crown Prince George of Greece receives the title <<Prince of Crete>>".
DISPLAY "2 April: Louis Brugnara is elected podestà of Trento"
DISPLAY "9 April - Anglo-Boer War: victory of the Boers in the Battle of Kroonstadt"
DISPLAY "April 14: the Universal Exhibition is inaugurated in Paris, the last of the 19th century."
DISPLAY "April 25th: an Italian Arctic expedition reaches 86°34' of latitude."
DISPLAY "April 30: the Hawaii islands officially become the territory of the United States of America."
DISPLAY "The Castello Sforzesco is inaugurated in Milan, after several years of renovation by the architect Beltrami."
DISPLAY "17 May: in southern Africa, British troops break the siege of Mafeking, one of the longest in the Anglo-Boer War."
DISPLAY "19 May: British annexation of the Tonga Islands."
DISPLAY "24 May: Pope Leo XIII enrolls Rita da Cascia in the register of Saints Rita da Cascia"
DISPLAY "30 May: the Boer state of Orange, in South Africa at war against the British colonial power, surrenders."
DISPLAY "3 June: general elections in the Kingdom of Italy, with a runoff on the 10th: a clear advance by left-wing forces."
DISPLAY "18 June: following the great socialist affirmation, the government of Luigi Pelloux, in office since 1898, falls in Italy."
DISPLAY "20 June: in Beijing the xenophobic rebels kill the German empire's plenipotentiary, von Ketteler."
DISPLAY "June 23: The Church of the Sacred Heart is officially completed in Paris."
DISPLAY "24 June: in the Kingdom of Italy the new head of government is an octogenarian from Piedmont, the Honourable Saracco."
DISPLAY "June 26: The United States Government announces its intention to send an expeditionary corps of Civil War veterans to China against the Boxers."
DISPLAY "The first section of the metro line opens to the public in Paris."
DISPLAY "July 2: the first airship designed by the German Ferdinand von Zeppelin takes flight over the skies of Europe."
DISPLAY "3 July: a very hard interventionist speech by the German Kaiser, William II, who calls together the Great Powers against the Chinese xenophobic rebellion. Italy will decide to join on 7 July."
DISPLAY "4 July: another historic day in the Boer War: the British disperse the enemy in Vlakfontein."
DISPLAY "10 July - Paris: in the II Olympics, Ray Ewry wins 3 Olympic gold medals in the same day in the jumps from stationary (high, long, triple)."
DISPLAY "19 July: the troops of the bersaglieri heading to China against the rebels set sail from Italy;"
DISPLAY "29 July - Monza: the Tuscan anarchist Gaetano Bresci kills the King of Italy Umberto I of Savoy. At the trial the regicide will declare that he wanted to avenge the victims of the Milanese repression of 1898."
DISPLAY "August 2: At the station in Paris, an anarchist attempts to assassinate the Shah of Persia."
DISPLAY "August 10: Vittorio Emanuele III swears before the Chambers as the third king of Italy."
DISPLAY "August 14: In Beijing, the troops of the international expedition free the Foreign Legations quarter, besieged by the Boxers for 55 days."
DISPLAY "29 August: after a very short trial (less than a day), the Court of Assizes in Milan sentences the regicide Bresci to life imprisonment."
DISPLAY "Britain annexes the Transvaal"
DISPLAY "September 23: The 5th Congress of the Socialist International opens in Paris with the meeting of 701 delegates from 21 nations."
DISPLAY "5 October: in Paris, socialist congressmen condemn Britain for its policy in the Boer regions."
DISPLAY "October 20: Great Britain and the German Empire announce that they have reached an agreement to prevent China, defeated after the end of the xenophobic insurgency, from being divided among the Powers."
DISPLAY "21 October: the Italian astronomer Giovanni Schiaparelli retires after 39 consecutive years as director of the Brera Observatory. He is 65 years old."
DISPLAY "November 7: In the United States of America, Republican William McKinley is re-elected President for a second term. Defeated Democratic rival, William J. Bryan."
DISPLAY "November 11: For the first birthday as king of Victor Emmanuel III, an amnesty extended to crimes of opinion is granted in Italy."
DISPLAY "November 12: A People's University is opened in Turin."
DISPLAY "16 November: In the State of Colorado, a young African-American murderer is brutally lynched."
DISPLAY "22 November : The Boer leader in exile, <<Oom>> Kruger, is triumphantly welcomed on his arrival in France."
DISPLAY "Severe flooding of the Tiber River in Rome: it is the most serious since 1870."
DISPLAY "In Genoa, unrest breaks out following the prefectural order to dissolve the local Chamber of Labour."
DISPLAY "December 14: The German physicist Max Planck enunciates the <<quantum theory>>, reversing all the previous hypotheses about the way energy would flow (not in a continuous way, therefore, but in the form of particles called, precisely, <<quantum>>)."
DISPLAY "December 16: Italy and France diplomatically agree to specify their respective spheres of influence in North Africa."
DISPLAY "December 19: In Munich, the Russian political exile Vladimir Ilic Ulianov, known as Lenin, founds the revolutionary publication <<Iskra>>, or <<Spark>>."
DISPLAY "December 24: The Ordinary Holy Year is declared ended. It was the only one that could be celebrated in the 19th century."
DISPLAY "December 28: In France, all those involved in the so-called <<Dreyfus affair>> are amnestied."
DISPLAY "Do you want to see the events of other years?"
ACCEPT Q
               IF Q = "yes" OR "y" OR "Y" OR "YES" OR "Yes" GO TO TIME-MACHINE
                   ELSE DISPLAY "OK, GOOD JOB :)"
                       DISPLAY "I EXIT IN 3 SECONDS..."
                       CALL "CBL_OC_NANOSLEEP" USING "1000000000"
                   END-CALL
                   DISPLAY "I EXIT IN 2 SECONDS.."
                   CALL "CBL_OC_NANOSLEEP" USING "1000000000"
                   END-CALL
                   DISPLAY "I EXIT IN 1 SECOND."
                   CALL "CBL_OC_NANOSLEEP" USING "300000000"
                   END-CALL
                   STOP RUN.

TIME-MACHINE-1901 SECTION.
DISPLAY "January"
DISPLAY "January 1: Nigeria becomes an English protectorate."
DISPLAY "Australia becomes a confederation within the British Empire."
DISPLAY "January 10: The first oil reservoir in Texas (USA) is discovered at Beaumont."
DISPLAY "April"
DISPLAY "April 27th: The first car tour of Italy starts from Turin, organised by Corriere della Sera."
DISPLAY "September"
DISPLAY "September 14: After the assassination of William McKinley, Theodore Roosevelt is elected President of the United States."
DISPLAY "October"
DISPLAY "9 October: The bandit Musolino is captured in Acqualagna."
DISPLAY "December"
DISPLAY "December 10: The first Nobel Prize ceremony is held in Oslo."
DISPLAY "December 12: first transoceanic radio broadcast by Guglielmo Marconi, between Zealand (in the Netherlands) and the island of Newfoundland (in Canada)."
DISPLAY "Do you want to see the events of other years?"
ACCEPT Q
               IF Q = "yes" OR "y" OR "Y" OR "YES" OR "Yes" GO TO TIME-MACHINE
                   ELSE DISPLAY "OK, GOOD JOB :)"
                       DISPLAY "I EXIT IN 3 SECONDS..."
                       CALL "CBL_OC_NANOSLEEP" USING "1000000000"
                   END-CALL
                   DISPLAY "I EXIT IN 2 SECONDS.."
                   CALL "CBL_OC_NANOSLEEP" USING "1000000000"
                   END-CALL
                   DISPLAY "I EXIT IN 1 SECOND."
                   CALL "CBL_OC_NANOSLEEP" USING "300000000"
                   END-CALL
                   STOP RUN.

TIME-MACHINE-1902 SECTION.
DISPLAY "After giving signs of increasing activity, La Pelée exploded with violence, destroying the city of Saint-Pierre. An incandescent cloud of gas and ashes hit the town and 28,000 people died in less than a minute. Only one prisoner survived in an underground prison."
DISPLAY "The American luthier Orville Gibson founded the Gibson Guitar Corporation."
DISPLAY "The United States purchases the rights to the Panama Canal from Spain."
DISPLAY "Tomaso Vialardi of Sandigliano, Major of the 3rd Alpine Regiment, then Major General, constitutes in winter the 1st Specialist Group of Alpine Skiers."
DISPLAY "Genoa, the first football team in Italy, founds the youth sector (under 16 years old)."
DISPLAY "Discovery of the aetiological agent of sleeping sickness (Tripanosoma castellani)"
DISPLAY "Sir Arthur Conan Doyle is named Baronet thanks to the historical novel The Great Boer War."
DISPLAY "Italy: the world's first three-phase high voltage electric railway line"
DISPLAY "Peter Pan appears for the first time in the novel The Little White Bird by James Matthew Barrie."
DISPLAY "6 March: Real Madrid, one of the most titled football clubs in history, is founded."
DISPLAY "9 March: the Vicenza Football Association is founded."
DISPLAY "May: an uprising of Angola's indigenous peoples against English colonial rule explodes."
DISPLAY "May 8: The La Pelée volcano explodes in Martinique: over 40,000 victims."
DISPLAY "31 May: end of the Second Anglo-Boer War with the Treaty of Vereeniging."
DISPLAY "14 July: the bell tower of St. Mark's in Venice collapses: neither wounded nor dead."
DISPLAY "July 17: Willis Haviland Carrier builds the first air conditioning system."
DISPLAY "15 September - Italy: the song Torna a Surriento is composed in honour of the Prime Minister Giuseppe Zanardelli, who is visiting the city of Sorrento."
DISPLAY "26 September: in the Sicilian town of Modica a disastrous flood causes 112 victims. Precipitations of such proportions had never before been observed in living memory in that territory."
DISPLAY "21 November: the Thousand Days' War in Colombia ends."
DISPLAY "Do you want to see the events of other years?"
ACCEPT Q
               IF Q = "yes" OR "y" OR "Y" OR "YES" OR "Yes" GO TO TIME-MACHINE
                   ELSE DISPLAY "OK, GOOD JOB :)"
                       DISPLAY "I EXIT IN 3 SECONDS..."
                       CALL "CBL_OC_NANOSLEEP" USING "1000000000"
                   END-CALL
                   DISPLAY "I EXIT IN 2 SECONDS.."
                   CALL "CBL_OC_NANOSLEEP" USING "1000000000"
                   END-CALL
                   DISPLAY "I EXIT IN 1 SECOND."
                   CALL "CBL_OC_NANOSLEEP" USING "300000000"
                   END-CALL
                   STOP RUN.

TIME-MACHINE-1903 SECTION.
DISPLAY "Mariano Fortuny makes the Fortuny Lamp."
DISPLAY "Aurelio Covotti wins the prize of the Accademia dei Lincei."
DISPLAY "Italy bans slavery in Somalia."
DISPLAY "23 March - United States: the Wright brothers present the patent for a motorized aircraft."
DISPLAY "April 19 - Galatina (Lecce): following a peasant uprising, the Carabinieri, intervened to quell the uprising, shoot the insurgents leaving 2 dead and 30 wounded on the ground. The fallen are Angelo Gorgone and Lisi Oronzo called <<Penna>>. This is to be considered the first revolt against the landowners of the time and was contagious throughout Salento: in 1906, in fact, was agreed the first contract of employment of farm labourers that provided 12 hours of work, including an hour and a half break, a weekly wage equal to 1.5 lire daily for men and 0.50 for women."
DISPLAY "April 23 in Madrid, during the 14th International Medical Congress, Ivan Pavlov reads <<The Experimental Psychology and Psychopathology of Animals>> in which he describes his work on conditioned reflection in animals."
DISPLAY "June 11: Military uprising in Serbia and the killing of King Alexander I and his family. The Obrenovic dynasty is replaced by the Karadordevic dynasty."
DISPLAY "16 June - United States: Pepsi Cola drink is born."
DISPLAY "1 July - 19 July: the first edition of the Tour de France, won by Maurice Garin."
DISPLAY "20 July: After twenty-five years of pontificate, Pope Leo XIII dies in Rome."
DISPLAY "4 August: Cardinal Giuseppe Melchiorre Sarto, former Patriarch of Venice, is elected Pope, who takes the name of Pius X."
DISPLAY "10 August: a disastrous fire causes the death of 84 people in a Paris metro station."
DISPLAY "August 28: Harley-Davidson, one of the most famous motorcycle manufacturers in the world, is founded in Milwaukee (Wisconsin)."
DISPLAY "September 28th: The Pugliano-San Vito-Eremo-Vesuvius electric rack railway is inaugurated."
DISPLAY "October 1: Professor Daniele Rivoire starts printing in Pinerolo La Vedetta di Sion and the Herald of the presence of Christ."
DISPLAY "November 3: Roosevelt sends the warship Nashville to Panama, the independence of the State of Panama from Colombia is declared."
DISPLAY "November 17: At the Copenhagen Congress, the Russian Social Democratic Workers' Party splits into two sections: the Bolsheviks led by Lenin and the Mensheviks led by Julius Martov."
DISPLAY "17 December - United States: first flight of the Wright brothers on Kitty Hawk's beach in North Carolina, who managed to get their aircraft off the ground for 12 seconds."
DISPLAY "Do you want to see the events of other years?"
ACCEPT Q
               IF Q = "yes" OR "y" OR "Y" OR "YES" OR "Yes" GO TO TIME-MACHINE
                   ELSE DISPLAY "OK, GOOD JOB :)"
                       DISPLAY "I EXIT IN 3 SECONDS..."
                       CALL "CBL_OC_NANOSLEEP" USING "1000000000"
                   END-CALL
                   DISPLAY "I EXIT IN 2 SECONDS.."
                   CALL "CBL_OC_NANOSLEEP" USING "1000000000"
                   END-CALL
                   DISPLAY "I EXIT IN 1 SECOND."
                   CALL "CBL_OC_NANOSLEEP" USING "300000000"
                   END-CALL
                   STOP RUN.

我添加了完整的代码这里有很多东西,只有历史事实,您基本上可以跳过所有“显示”部分我添加了一个循环,但在某一行,它只是“破坏”了代码]

cobol gnucobol
2个回答
0
投票

显然,单行的最大长度为512个字符,而第144行有579个字符


0
投票

考虑到分隔单词的空格,将长行折成带引号的句段。

© www.soinside.com 2019 - 2024. All rights reserved.