Re: INVOKE (English vs COBOL

From: James J. Gavan (jjgavan_at_shaw.ca)
Date: 09/13/04


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



Relevant Pages

  • Re: When is Invoke() Really Required?
    ... then it is safe to call that method. ... in the context of the calling thread, now if the calling thread does not ... > Invoke, BeginInvoke, EndInvoke and CreateGraphics. ... Does this apply for absolutely every method or property in a control ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: ef06 -- A Portable C Function Call Interface
    ... considering the various implementation methods of Forth and the ... and stack order or stack frames. ... Stuff like stack representation in Forth and the C calling convention ... New standard: http://www.forth200x.org/forth200x.html ...
    (comp.lang.forth)
  • Re: VS: operator <<(...const std::string&) does not call ->rdbuf()
    ... characters as if by calling os.rdbuf->sputn", nothing about "should" or "shall" or some other requirement. ... Maybe there is a defect in the Standard, or a defect in Dinkumware's implementation. ... 'sputc' is specified to check the availability of the room in the buffer using the pointers, and call 'overflow' where you're supposed to dump the characters, and change the pointers. ...
    (microsoft.public.vc.language)
  • Re: parsing variable arg lists via va_list pointers (any gurus here?)
    ... The relevant paragraph from the Standard is: ... value of ap in the calling function is indeterminate and shall be ... void superfunc(int a, ... ... I haven't been able to find anything in any standard that explicitly ...
    (comp.lang.c)
  • Re: Populate an ImageList from another thread
    ... the control is returned to the calling thread. ... There are good reasons to use BeginInvoke() instead of Invoke, but working around a deadlocking design bug isn't one of them. ... Because it's a situation that otherwise would deadlock, that "later time" usually winds up being "not until the background thread has completed its work", which means that those updates all come at once, after the background thread is done. ... Now, I don't know about you, but IMHO it doesn't really make much sense to use a background worker thread when the net effect winds up being identical to that had one just done everything synchronously in the main GUI thread. ...
    (microsoft.public.dotnet.languages.csharp)