Re: COBOL's Influence on C
- From: "tlmfru" <lacey@xxxxxxx>
- Date: Tue, 13 Nov 2007 12:47:57 -0600
Robert <no@xxxxxx> wrote in message
news:dsmhj317b7236kep9l7j2i53jp39dcvlo6@xxxxxxxxxx
On Mon, 12 Nov 2007 10:19:38 -0500, "Rick Smith" <ricksmith@xxxxxxx>wrote:
depreciated by many/most
Modern BASICs also use conditions in the SELECT CASE
statement and may have been influenced by COBOL. <g>
Speaking of modern BASICs ...
GOSUB, which is the same as Cobol's out of line PERFORM, has been
compilers and dropped from VB.NET. It was replaced by SUB, which is alocal function
call. In my opinion, Cobol should have done the same.
In my opinion and usage, the word SUB, short for SUBroutine, refers to a
stand-alone piece of code not included with the source program under
consideration. (It can certainly be in the same compilation unit, of
course). A function in this context is some common routine which isn't
compiled (I say this to keep OO vocabulary out of the discussion), usually
supplied by the compiler writers: e.g., calls on the OS. There should be a
completely different verb to execute sections of code within the source
program as opposed to that used to execute wholly external sections.
COBOL's PERFORM does the first perfectly well - unambiguous,
understandable - and CALL (or INVOKE, etc.) does the second: and neither can
be mistaken for the other. Why change?
In PROGRESS, a language I have little love for but have had to use quite a
bit, the in-line perform is WHILE, and the out-of-line perform is RUN: but
RUN is also used as the CALL. If the label isn't defined within the current
source, it's assumed to be an external routine: no precautionary diagnostic.
So it's very common to have a clean compile which then blows up with
unresolved linkages when attempting to execute. Not the same situation as
what Robert's suggesting but a cautionary tale.
PL
.
- Follow-Ups:
- Re: COBOL's Influence on C
- From: Robert
- Re: COBOL's Influence on C
- References:
- COBOL's Influence on C
- From: Rick Smith
- Re: COBOL's Influence on C
- From: Robert Jones
- Re: COBOL's Influence on C
- From: Rick Smith
- Re: COBOL's Influence on C
- From: Charles Hottel
- Re: COBOL's Influence on C
- From: Judson McClendon
- Re: COBOL's Influence on C
- From: Rick Smith
- Re: COBOL's Influence on C
- From: Robert
- COBOL's Influence on C
- Prev by Date: Re: COBOL's Influence on C
- Next by Date: Re: AJAX devtool using Cobol
- Previous by thread: Re: COBOL's Influence on C
- Next by thread: Re: COBOL's Influence on C
- Index(es):
Relevant Pages
|