Re: COBOL's Influence on C




"Judson McClendon" <judmc@xxxxxxxxxxxxx> wrote in message
news:gYHZi.2085$2n.224@xxxxxxxxxxxxxxxxxxxxxxxxx
"Charles Hottel" <chottel@xxxxxxxxxxxxx> wrote:

I f they really want to improve C they should add an EVALUATE statement.

AFAIK, C has always had the 'switch' statement, Pascal has the 'case'
statement, modern BASICs have the SELECT statement, etc., all of which
predated EVALUATE, and from which I suspect EVALUATE was taken.

Microsoft QuickBASIC's SELECT CASE appears
to date from about 1987. COBOL's EVALUATE was
in the 1985 standard; but was first recommended by the
CODASYL COBOL Committee in 1978. I suspect that
1978 predates every concept of "modern BASICs".

Both C's switch and Pascal's case have labels.
FORTRAN's computed GOTO and COBOL's GO TO
DEPENDING have labels and predate both C's switch
and Pascal's case. Each of the languages: FORTRAN,
COBOL, C, and Pascal, use, similarly, an integral value
to transfer control to a label.

COBOL's EVALUATE uses conditions, instead of labels.
Conditions and labels are not the same despite the
appearance of similarity in some circumstances.

I suspect that EVALUATE was designed to accommodate
decision tables, to include a capability to replace some uses
of GO TO DEPENDING, and that other programming
languages had no influence in regard to EVALUATE.

Modern BASICs also use conditions in the SELECT CASE
statement and may have been influenced by COBOL. <g>


.



Relevant Pages

  • Re: XML and OO COBOL
    ... > We can do this with CoBOL, ... I don't like data files that can not be passed ... The Labels are Standard clause must be present to qualify as a standard ...
    (comp.lang.cobol)
  • Re: COBOL aint quite dead - yet !
    ... sometimes I will replace the EXIT. ... was via the last paragraph. ... So you have several paragraph labels within a section. ... In Cobol a label may be the target of a goto, a perform, a drop ...
    (comp.lang.cobol)
  • Re: GB12 question
    ... > I am purely guessing, thus, but suspect no more than 500 were produced. ... > printed) labels. ... > many GB12 labels GB would be willing to sign before getting bored ...
    (rec.music.makers.guitar.jazz)
  • Re: how to use a label??
    ... A case or default label shall appear only in a switch statement. ... Further constraints on such labels are discussed under the switch ... int main ... goto loopend; ...
    (comp.lang.c)
  • LDMud 3.3.718 released
    ... This release introduces a few new efuns (time/date conversion, ... could crash the driver due to stack overflows, ... Disallowed case labels in inner blocks of switch statements, ...
    (rec.games.mud.lp)