Re: Confessions of an "OO Foreigner"

From: William M. Klein (wmklein_at_nospam.netcom.com)
Date: 12/30/03


Date: Tue, 30 Dec 2003 06:56:31 GMT

correction (speaking to myself - speaking to myself <G>)

It is called "inline invocation"

-- 
Bill Klein
 wmklein <at> ix.netcom.com
"William M. Klein" <wmklein@nospam.netcom.com> wrote in message
news:IY8Ib.11519$lo3.3414@newsread2.news.pas.earthlink.net...
> FYI - if you want to use the "returned value" from an object reference/method,
> you MAY use the
>
>     Move object-reference::method-name (param-n)
>
> syntax (called "inline object reference")
>
> -- 
> Bill Klein
>  wmklein <at> ix.netcom.com
> "William M. Klein" <wmklein@nospam.netcom.com> wrote in message
> news:Rw7Ib.11392$lo3.2690@newsread2.news.pas.earthlink.net...
> > Donald,
> >   When you can use that syntax is "medium" restricted.  The following is
from
> > the Standard:
> >
> > "8.4.2.9 Object property
> > Object properties provide a special syntax to get information out of and
pass
> > information back into an object. The mechanisms for accessing object
> properties
> > are get property methods and set property methods. A get property method is
a
> > method explicitly defined with the GET PROPERTY phrase or a method
implicitly
> > generated for a data item described with the PROPERTY clause; a set property
> > method is a method explicitly defined with the SET PROPERTY phrase or a
method
> > implicitly generated for a data item described with the PROPERTY clause."
> >
> > -- 
> > Bill Klein
> >  wmklein <at> ix.netcom.com
> > "Donald Tees" <donald_tees@nospam.sympatico.ca> wrote in message
> > news:Y86Ib.4166$Vl6.1073088@news20.bellglobal.com...
> > > LX-i wrote:
> > > > (there is a reply down there somewhere....)
> > > >
> > > > William M. Klein wrote:
> > > >
> > > >>    INVOKE  specific-object-reference-data-item   specific-method-name
> > > >>                 USING  various-parameter-by-CONTENT/REFERENCE/VALUE
> > > >>                 RETURNING returned-value-data-item
> > > >>
> > > > ...
> > > >
> > > >>    INVOKE method-name UPON object-reference-name USING ...
> > > >>
> > > >> Well, I lost <G> that battle and we ended up with INVOKE
> > > >> object-reference.  Once
> > > >> we had "object-reference" as the object (grammatical usage) of the
> > > >> INVOKE verb,
> > > >> then I though we AT LEAST should have an OPTIONAL keyword explaining
> > > >> "what"
> > > >> (adverbial) we wanted to do with this "second" thing, the
> > > >> method-name.  What I
> > > >> wanted was something like
> > > >>
> > > >>   INVOKE object-reference <WITH>  method-name USING ....
> > > >>
> > > >> Well, I lost <G> that battle and we ended up with two "nouns"
> > > >> following the
> > > >> INVOKE verb - with two VERY different meanings and no preposition
> > > >> between them.
> > > >> As far as I know, this is the ONLY time this exists in COBOL (which is
> > > >> English
> > > >> like) and totally (IMHO) obscures what the INVOKE statement does!!!
> > > >
> > > >
> > > > I'm with you.  Other languages use something like
> > > >    return-value = object.method(parameters)
> > > >
> > > > I'm surprised they didn't say
> > > > INVOKE method-name OF object-name ...
> > > >
> > > > This utilizes a very familiar COBOL construct, which is used to uniquely
> > > > identify data items.
> > > >
> > > > Any of you savvier OO guys know of a reason that that wouldn't make more
> > > > sense?
> > > >
> > > >
> > >
> > > In reply to that latter, you can do exactly that by using the set
> > > property method to invoke a procedure.
> > >
> > > IE MOVE "action-required" TO INVOCATION-METHOD of object-name.
> > >
> > > Donald
> > >
> >
> >
>
>


Relevant Pages

  • Re: Confessions of an "OO Foreigner"
    ... > When you can use that syntax is "medium" restricted. ... > are get property methods and set property methods. ... > Bill Klein ... > wmklein ix.netcom.com ...
    (comp.lang.cobol)
  • Re: Word-processing challenge anyone?
    ... > Bill Klein ... > wmklein ix.netcom.com ... > "William M. Klein" wrote in message ... >> Are you counting CR, LF, and other record separators in your ...
    (comp.lang.fortran)
  • Re: Word-processing challenge anyone?
    ... > Bill Klein ... > wmklein ix.netcom.com ... > "William M. Klein" wrote in message ... >> Are you counting CR, LF, and other record separators in your ...
    (comp.lang.cobol)
  • Re: OT - in serach of Hardware recommendation
    ... Bill Klein ... wmklein ix.netcom.com ... William M. Klein wrote: ... Laptop/Notebook. ...
    (comp.lang.cobol)
  • Re: Micro Focus COBOL Compiler Questions
    ... Bill Klein ... wmklein ix.netcom.com ... William M. Klein wrote: ... Unless they have a ' STOP "Fix problem and continue"'. ...
    (comp.lang.cobol)