sommar@enea.se (Erland Sommarskog) (05/15/89)
Matthew Barkley (barkley@weiss.cs.unc.edu) writes: >I have used FORTRAN, COBOL, Pascal, C, and BASIC during the last 20 >years. None of the other 4 comes close to COBOL in that language's >real strengths: Record-oriented I/O and reporting. I have not used >Ada, but I suspect that it isn't any better than the others. The ease >of formatting an output page in COBOL (with all the nasty editing done >for you) just doesn't exist anyhwere else, in my non-Ada experience. >Can Ada really do as well? Those who haven't used both Ada and COBOL >need not reply; I'm looking for experience, not speculation. To take the question first: No, Ada does not give you so much support as the Cobol report writer does. We use the Cobol report writer in my current project, and while it is easy to use, there surely are drawbacks. One is that we only use Cobol for the reports, the rest is done in VAX-Pascal. And while VMS really gives good support for mixing langauges, it still gives rise to troubles. In fact when I joined this project, I used Cobol for the first report which had a simple layout, but when I got the next which was more complex, I wrote a report handler in Pascal, which I at the time gave me more flexibility. Since then I have become more acquinted with Cobol, but some problem remains. I you find out that must broaden a column, you have to re-compute all columns following it, since - as far as I know - can't give relative column positions. But the main point is: the langauge doesn't have to include such a thing as a report writer. In fact it shouldn't. Instead it should give support for defining a good interface of a general, re-uasable report writer, and provide the primitives for implementing it. I haven't done this in Ada, but believe me, it's a fairly straight- forward problem. Cobol provides the report writer, but not the tools for simple modularization. OK, if you want a flashy 4GL-style report writer, then Ada or any other 3GL is of little help. Personally, I think a report writer with an old-fashioned procedureal interface is to prefer. Since your flashy 4GL is less likely to handle everything you need to do the report, you end up with using both a 3GL and a 4GL, and have deinfe many items twice. Thus, making the system more vulnerable for changes. -- Erland Sommarskog - ENEA Data, Stockholm - sommar@enea.se