Re: Confessions of an "OO Foreigner"
From: William M. Klein (wmklein_at_nospam.netcom.com)
Date: 12/30/03
- Next message: William M. Klein: "Re: Confessions of an "OO Foreigner""
- Previous message: Richard: "Re: CoBOL moved to OO"
- In reply to: Donald Tees: "Re: Confessions of an "OO Foreigner""
- Next in thread: William M. Klein: "Re: Confessions of an "OO Foreigner""
- Reply: William M. Klein: "Re: Confessions of an "OO Foreigner""
- Reply: Donald Tees: "Re: Confessions of an "OO Foreigner""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 30 Dec 2003 04:53:05 GMT
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 >
- Next message: William M. Klein: "Re: Confessions of an "OO Foreigner""
- Previous message: Richard: "Re: CoBOL moved to OO"
- In reply to: Donald Tees: "Re: Confessions of an "OO Foreigner""
- Next in thread: William M. Klein: "Re: Confessions of an "OO Foreigner""
- Reply: William M. Klein: "Re: Confessions of an "OO Foreigner""
- Reply: Donald Tees: "Re: Confessions of an "OO Foreigner""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]