Re: INVOKE (English vs COBOL
From: James J. Gavan (jjgavan_at_shaw.ca)
Date: 09/13/04
- Next message: James J. Gavan: "Re: List boxes in Microfocus Dialog System/Net Express?"
- Previous message: Howard Brazee: "Re: Payment systems (was: If you were inventing CoBOL...)"
- In reply to: William M. Klein: "INVOKE (English vs COBOL (was: If you were inventing CoBOL..."
- Next in thread: Rick Smith: "Re: If you were inventing CoBOL..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 13 Sep 2004 17:50:51 GMT
William M. Klein wrote:
>Relatively early in the development of the 2002 Standard (I think when we were
>still hoping for a '97 Standard), I wrote a number of papers on WHY I thought
>that
>
> Invoke object-reference "method-name" Using Parameter
>
>was "wrong" and not consistent with the rest of COBOL (or the definitions of
>what was going on).
>
>It seemed to me then (and still does) that what this statement is ACTUALLY
>trying to convey was:
>
>Send-a-message to the object referenced by Object-Reference to INVOKE the
>"method-Name" on itself - using parameters ...
>
> or my COBOL-like (sort-of)
>
>Send-Message "method-name" TO object-reference Using Parameter-1 ...
>
>These papers "got nowhere" and the INVOKE syntax became a "de facto" in COBOL
>(as extensions) for a number of implementations - long before the final drafts
>of the Standards went out for public review.
>
>I still do NOT agree that one "invokes" the Object-Reference - but COBOL is not
>English and no matter how much it is influenced by English, the differences
>exist and always will exist.
>
>
>
Interesting. So now I go back to Raymond Obin's book "OO An Introduction
for COBOL Programmers" - 1993 published on behalf of the OCTG. First
mention of INVOKE - Page 11 :-
----------------------------------------------------------------------------------------------------------------------
3.1.3. Using Methods.
Methods in an object can be called. Calling a method is like calling a
program except that the method is a 'program within an object'. (<< that
ties back with when I viewed a method as a 'mini-program' - still is but
not quite >>). To call a program, we use the name of the program; to
call a method, we use a combination of the object and the name of the
method within the object.
In an application, methods can be called from a number of different
places (<<my Cart Wheel>>); the end-user can cause methods to be called
through the user interface; other methods can call methods as they
execute; and the system can call methods, for example, a "MakeBackup"
method could be called every day at 5.00pm.
The he has a greyed, highlight box :-
Calling a Method
The procedure code in an object is used by Calling it. This is done just
like calling a program except that it is a call to a Method in an Object.
The term Invoke a Method is also used.
-------------------------------------------------------------------------------------------------------------------------
Reasonably clear to me - and a couple of "co-conspirators" to get the
book out, (amongst others), Schricker and Klein :-)
CALL <aProgram> using aaaaaa returning bbbbbb
CALL <aProgram> <entry-point> using aaaaaaa returning bbbbbbb
INVOKE <aProgram = it's object version> <entry-point = methodname> using
aaaaaaa returning bbbbbbb
Add entry-points and CALL and INVOKE look the same to me.
Anyway as you concluded - lump it or like it, (and I like it), we are
stuck with the INVOKE syntax as is.
Jimmy
- Next message: James J. Gavan: "Re: List boxes in Microfocus Dialog System/Net Express?"
- Previous message: Howard Brazee: "Re: Payment systems (was: If you were inventing CoBOL...)"
- In reply to: William M. Klein: "INVOKE (English vs COBOL (was: If you were inventing CoBOL..."
- Next in thread: Rick Smith: "Re: If you were inventing CoBOL..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|