Code Comments
Programming Forum and web based access to our favorite programming groups.A few points (I may come back to others later) interspersed below: "James J. Gavan" <jgavandeletethis@shaw.ca> wrote in message news:bQPcg.184184$P01.162682@pd7tw3no... <snippage> > Actually my thoughts are quite radical, completely disregarding the setup > you have 'grown' into. Two immediate impressions :- > > 1. Get rid of the friggin document you have at the moment. Over 1,000 > pages and still growing - or will be once you start adding the TRs in - > when 2010 ? Seriously you get the ISO imprimatur for 2008, earliest > anybody is likely to implement 2009 - *IF* THEY IMPLEMENT; the earliest > you could get reaction to TRs is 2010/2011 when END USERS have bitched to > their vendor that the TRs don't work so good ! First off, the reason we came up with TR's is so that they would get exposure *before* they went into the 2008 standard -- the TR's are actually applicable to the *2002* standard. More on the size of the document below, relative to your suggestion about how to resolve that. > Hint, hint you still haven't got :- > > invoke thisCollectionObject "quitIteration" > > to break out of the iterative loop. It maybe the way that they have done > it but with M/F if on a conditional test you try to do EXIT METHOD - it > doesn't work; it only breaks out of an iterative loop, (not necessarily > the method), with 'quitIteration'. I really have no expertise in the OO arena, either in COBOL or otherwise. I make my living writing code in ALGOL dialects! ;-) > The replacement for the existing documentation - triggered by Richard > posting those ICL syntax crib sheets, which of course are in most LRMs. If > for example it's 'INSPECT REPLACING' show the standard syntax IMMEDIATELY > followed by umpteen examples showing all the options. Use *absolute* > minimal wording to describe any nuances which may apply. > As to the size of the document, well, yes, COBOL is wordy and the standard is wordy. But rules are both indicative of what is *permitted* and what is *prohibited*, and limiting the description of the language to diagrams and examples -- where there is a near-infinite set of the cases that are *permitted* as well as a near-infinite set of the cases that are *prohibited* -- does not lend itself to a more concise document! Both the COBOL language and the rules in the standard itself have grown to be decidedly Baroque, I'll grant readily. But getting rid of rules that reflect forty-five years of precedent is likely to allow for incompatibilities with prior standards, and *evolution* is important for both the language and the applications written in it. As an example, I just closed a customer problem report (against COBOL74!) complaining that when the Unisys extension that allowed any character in a PICTURE character-string outside of the strict ANSI syntax to be treated like "0" or "/" was turned on, a value like "-12.34" put into a data item declared "PICTURE -(3).ZZ" contained something like " -1.ZZ". What exactly is wrong with "PIC -(3).ZZ", and how are you going to state what's wrong with it in a simple syntax diagram and a set of examples all of which compile successfully? In this instance, the customer did not know that the PICTURE was against standard COBOL rules; I cited ANSI X3.23-1974 page II-20, 4.7.4, PICTURE clause, General Rule 8, specifically, the paragraph dealing with "Z", " ... may only be used to represent the leftmost leading numeric character positions ...", and in this instance, the leftmost leading character positions are represented by "-" instead, and also pointed him to our documentation that said the same thing. In this case, "PICTURE -(3).99 BLANK WHEN ZERO" was what the customer wanted, and they were satisfied by the response. There are *a lot* of nuances that apply. > You may recall I posted something for Chris where he wanted a picture of a > box. Did it with the M/F Screen Section syntax. I was real clever ! No I > wasn't - I cribbed it from an existing M/F example. I can assure you that > if I had bothered to read the M/F 'words' for the extended syntax I would > probably never have latched on to the features available. Two 'goes' at > adjusting the existing example which was for a two-dimensional table, gave > me the result that I could just code DISPLAY SCREEN-BOX, a reference to a > 50 x 25 Table. Extensive examples have been frequently suggested to J4, and a lot of that ends up in the CONCEPTS annex. The standard is not a reference manual for a particular COBOL implementation or a replacement for Thane's book; I think its *primary purpose* is as a list of do's and don'ts *for the people who are writing COBOL compilers*. It is *the ultimate reference* to the language, and has to be comprehensive in both its inclusions and its exclusions. I am not convinced that the exclusions are adequately covered by examples of inclusion. More when I get time and opportunity . -Chuck Stevens
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.