Comments (2)
  • Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry

1 wmklein commented Permalink

It is a little strange to call these IBM extensions. They are identified as extensions, but that is because the products are compared to the '85 Standard, not the 2002 Standard. (As far as that goes, the END PROGRAM feature is a part of the '85 Standard and is correctly marked as such in the manuals) <div>&nbsp;</div> In the 2002 where the OO features of CAll, METHOD, and FACTORY are introduced, the END markers are alsto standard. <div>&nbsp;</div> Of course, it is also ture that IBM implemented OO syntax that matched an early version of the ANSI/ISO Standard and does not full conform to the 2002 ANSI/ISO Standards. So to that extent, these might be considered extensions.

2 fswarbrick commented Permalink

I agree with you Bill. If they are going to call these extentions they may was well state that all of their OO features are IBM extensions! Which honestly they probably should do, because even though the syntax mostly (?) conforms to COBOL 2002, its usage doesn't come close (since OO COBOL without Java is no longer supported in any way, as far as I can tell). <div>&nbsp;</div> Now I would like to see some actual non-standard end markers that would be used (optionally, of course) to terminate procedure division paragraphs and sections. i.e... <div>&nbsp;</div> [code] <br /> program-id. myprog. <br /> [...] <br /> procedure division. <br /> main section. <br /> driver. <br /> perform init <br /> perform mainline <br /> perform cleanup <br /> goback <br /> end. <div>&nbsp;</div> init. <br /> accept curr-date from date yyyymmdd <br /> open input my-file <br /> output their-file <br /> end. <div>&nbsp;</div> mainline. <br /> perform another <br /> perform third <br /> end mainline. <div>&nbsp;</div> cleanup. <br /> close my-file <br /> their-file <br /> display 'we are done!' <br /> end. <div>&nbsp;</div> another section. <br /> first. <br /> display 'we are in another first' <br /> end first. <div>&nbsp;</div> second. <br /> display 'we are in another second' <br /> end second. <div>&nbsp;</div> end another section. <div>&nbsp;</div> third. <br /> display 'we are number 3!' <br /> end. <div>&nbsp;</div> end program myprog. <br /> [/code] <br /> One might validly ask "why"? I'll tell you why. So that I can eliminate using any periods to terminate executable statements! It's easy to forget (when I never use them for any statement other than the last statement of a paragraph/section). A period is really a 'scope terminator', not a 'statement terminator', so why not replace it with the word 'end' instead? <div>&nbsp;</div> Just a thought. No real expectation of having it implemented; but who knows. <div>&nbsp;</div> Frank