TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: MARTIN GREGORIE
from: TAUNO VOIPIO
date: 2020-08-31 21:14:00
subject: Re: Spectre / Meltdown

On 31.8.20 19.57, Martin Gregorie wrote:
> On Mon, 31 Aug 2020 17:01:31 +0100, druck wrote:
>
>> In any case I was born in 1968, and started programming on the BBC Micro
>> in the early 80s, so luckily I avoided Cobol then and ever since.
>>
> COBOL wasn't actively evil (apart from the ALTER statement - and that had
> vanished by the mid-80s. It just far too verbose:
>
>    ADD A to B GIVING C ON SIZE ERROR PERFORM OVERFLOW-TRAP.
>
> where the Java equivalent would be something like:
>
>    try {
>       c = a + b;
>    }
>    catch (ArithmeticException e) {
>       overflowTrap(e);
>    }
>
> There's also a lot of typing involved because of the size ot variable
> names and the number of them you have to define:
>
> - fields in structures have names that aren't linked in any way to the
>    structure's name.
>
> - if a program reads a value from an input file, writes it to a database
>    file and prints it in a report or displays it on screen, you'll end
>    defining the variable three times and the input and display forms will
>    be slightly different because they define external format.
>
> That said, COBOL did at least always let you catch ON SIZE ERROR overflow
> exceptions, which is more than could be said for other contemporary HLLS
> such FORTRAN. Specifying formats for input and output fields was also
> always pretty straight-forward and intuitive.
>
> However it had some terrible features such as the ALTER verb, which
> allowed a running COBOL program to self modify, making debugging hellish.
>
> Early COBOLs would allow you to call assembler subroutines but the
> language did not allow external subroutines to be written in COBOL. I
> don't remember seeing this feature in any implementation before 1978.
>
> Early COBOLs also required a program to be a single source file though it
> had a COPY statement that could be used to pull in record definitions or
> sections of code. Fortunately, the compilers could handle huge source
> files: a program of less then 200 lines usually did nothing useful.
> Programs were generally in the 1000-4000 line range though I have seen a
> few in the 10,000 line range.
>
> There was a built-in Y2K gotcha too: The only way you could get hold of
> the date was with a statement like
>
>  ACCEPT DATE-TODAY FROM SYSTEM-DATE.
>
> where the DATE-TODAY variable *had* to be declared in working storage as:
>
>    01 DATE-TODAY      PIC 9(6).
>
> and the ACCEPT statement would fill it with a date formatted as 'yymmdd'.
> This requirement was defined in the CODASYL Report (i.e. was part of the
> language standard) and AFAIK it was not changed until after Y2K had been
> and gone.


It was in the late 60's when Datamation published Goldilocks and
the three bears in compilable COBOL.

--

-TV

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.