[SATLUG] home computer
Al Castanoli
afcasta at texas.net
Wed Dec 6 07:40:21 CST 2006
On Tue, 2006-12-05 at 17:06 -0600, Brinkley Harrell wrote:
> Benjamin Temple wrote:
> > it would be even worse is it had said "teletype with COBOL" Ive heard the
> > language is hard to learn.
> >
> > {snip}
> COBOL (ah, memories) is not hard to learn -- the question is "how
> verbose do you want to be". As an example snatched right from Wikipedia,
> if you wanted to write a statement to compute one of the roots of the
> quadratic equation:
>
> X = (-B + SQRT( B^2 - 4 * A * C) ) / 2 * A
>
> one solution uses the compute verb:
>
> COMPUTE X = (-B + (B ** 2 - (4 * A * C)) **.5) / (2 * A).
>
> As an alternative, this could also be written as:
>
> MULTIPLY B BY B GIVING B-SQUARED.
> MULTIPLY 4 BY A GIVING FOUR-A.
> MULTIPLY FOUR-A BY C GIVING FOUR-A-C.
> SUBTRACT FOUR-A-C FROM B-SQUARED GIVING RESULT-1.
> COMPUTE RESULT-2 = RESULT-1 ** .5.
> SUBTRACT B FROM RESULT-2 GIVING NUMERATOR.
> MULTIPLY 2 BY A GIVING DENOMINATOR.
> DIVIDE NUMERATOR BY DENOMINATOR GIVING X.
>
> But, it's really clear.
>
> Here some humor from Wikipedia:
>
> Aphorisms and humor about COBOL
>
> It has been said of languages like C, C++, and Java that the only way to
> modify legacy code is to rewrite it - write once and write once again;
> or write once and throw away. On the other hand, it has been said of
> COBOL that there actually is one original COBOL program, and it only has
> been copied and modified millions of times.
>
> The name "ADD 1 TO COBOL GIVING COBOL" has been suggested for a
> hypothetical object-oriented dialect of COBOL, as a play on the name
> C++. While this is meant to suggest that COBOL is inherently verbose,
> the form given is more verbose than COBOL actually requires.
>
> Alternative expansions of the COBOL acronym have been suggested:
>
> * Compiles Only Because Of Luck
> * Compiles Only By Odd Luck
> * Completely Obsolete Business Oriented Language
> * Completely Over and Beyond reason Or Logic
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Brinkley Harrell
> http://www.fusemeister.com
Thanks for the COBOL refresher - I thought I'd left it behind me when I
left a Navy supply ship in 1979.
Al Castanoli
More information about the SATLUG
mailing list