Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site bmcg.UUCP Path: utzoo!linus!decvax!ittvax!dcdwest!sdcsvax!bmcg!bprice From: bprice@bmcg.UUCP Newsgroups: net.lang Subject: Re: If "MERRY XMAS" in COBOL is a must, then at least make it Structured Message-ID: <647@bmcg.UUCP> Date: Thu, 17-Nov-83 13:21:45 EST Article-I.D.: bmcg.647 Posted: Thu Nov 17 13:21:45 1983 Date-Received: Tue, 22-Nov-83 01:33:43 EST References: <804@ritcv.UUCP> Organization: Burroughs Corporation, San Diego Lines: 36 Path: bmcg!sdcsvax!dcdwest!ittvax!decvax!harpo!seismo!rochester!ritcv!jrc From: jrc@ritcv.UUCP >If we must have a COBOL version of PRINT "MERRY CHRISTMAS," let's at least >make it structured...... Here is one version of such a program. --The lower-case is my modifications to the original to make it shorter and representative of COBOL usage (as I [mis?]understand it). IDENTIFICATION DIVISION. PROGRAM-ID. MERRY-XMAS. ENVIRONMENT DIVISION. CONFIGURATION SECTION. SOURCE-COMPUTER. VAX11. OBJECT-COMPUTER. VAX11. PROCEDURE DIVISION. PRINT-CONTROL-LOOP. PERFORM PRINT-IT 15 times. STOP RUN. PRINT-IT. DISPLAY "MERRY CHRISTMAS". >Of course this code is *NOT* properly commented nor necessarily well written. >Isn't this an absurd number of lines of code just to accomplish such a simple >task? --Yes, it is. COBOL is definitely not a language for short programs by amateurs. COBOL is, however, a powerful language within its own scope. The fact of its continued use, as the most popular of all programming languages, says a lot about it. (I can't give a source, but I have heard that more programs have been written in COBOL than in all other languages combined; and further, except for the COBOL programs, the same is true for FORTRAN!) It must be that there is something very good, in some sense, about COBOL! -- --Bill Price uucp: {decvax!ucbvax philabs}!sdcsvax!bmcg!bprice arpa:? sdcsvax!bmcg!bprice@nosc