Re: Confessions of an "OO Foreigner"

From: LX-i (lxi0007_at_netscape.net)
Date: 12/31/03

  • Next message: Donald Tees: "Re: Confessions of an "OO Foreigner""
    Date: Wed, 31 Dec 2003 06:43:10 -0600
    
    

    Donald Tees wrote:

    > LX-i wrote:
    >
    >> Donald Tees wrote:
    >>
    >>> LX-i wrote:
    >>>
    >>>> 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.
    >>
    >>
    >>
    >> Then, would you simply invoke the object? Is that second parameter
    >> optional?
    >>
    >>
    >
    > You have to write a method that interpets "action-required" as a
    > command. The point, though, is that a "MOVE data to property-name of
    > object" is in fact the invocation of a method.
    >
    > Since the syntax you want actually executes code, you can use it for
    > just about any command you want. For example:
    >
    > move "error 26" to display-line of console-one.
    >
    > will open a the console window (if one is not open), display "non-fatal
    > error 26", ask for a character to be typed, then continue, with the
    > following method.
    >
    > method-id. set property display-line.
    > data division.
    > working-storage section.
    > 77 single-character picture x.
    > linkage section.
    > 77 console-line-in picture x(40).
    > procedure division using console-line-in.
    > display "non-fatal " console-line-in.
    > display "type any key to continue".
    > accept single-character.
    > exit method.
    > end method.
    >
    > I am not sure what you are asking. There is only one parameter,
    > referenced to an instance of an object.

    Well, I've never messed with OO COBOL (though I'd love to, and we've got
    a pending DOD mandate that may force us to, which is fine with me), so
    I'm not really familiar with the syntax. At some point in the program
    with the "move", you'd have to instantiate "console-one" as an instance
    of whatever object has that method, right?

    -- 
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~   /   \  /         ~        Live from Montgomery, AL!       ~
    ~  /     \/       o  ~                                        ~
    ~ /      /\   -   |  ~          LXi0007@Netscape.net          ~
    ~ _____ /  \      |  ~ http://www.knology.net/~mopsmom/daniel ~
    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
    ~         I do not read e-mail at the above address           ~
    ~    Please see website if you wish to contact me privately   ~
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    

  • Next message: Donald Tees: "Re: Confessions of an "OO Foreigner""

    Relevant Pages

    • Re: Confessions of an "OO Foreigner"
      ... would you simply invoke the object? ... Is that second parameter ... > object" is in fact the invocation of a method. ... > 77 single-character picture x. ...
      (comp.lang.cobol)
    • Re: Pass Parameter to Javascript
      ... >I did it through the row event. ... > Using findcontrol and adding the onclick there. ... >> I need to pass the second parameter o the function from within a datagrid ... Only problem is I keep getting many erros with my syntax. ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: 5.1.2.2.1 argv misdescription [was Re: Please Help---------&
      ... an identifier that designates the second parameter of the function ... upon start of the function invocation. ... pointers to "C strings", ... except that the last element of the array has a null pointer value. ...
      (comp.std.c)
    • Re: Pass Parameter to Javascript
      ... Using findcontrol and adding the onclick there. ... > I need to pass the second parameter o the function from within a datagrid ... Only problem is I keep getting many erros with my syntax. ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: 5.1.2.2.1 argv misdescription [was Re: Please Help---------&
      ... an identifier that designates the second parameter of the function ... upon start of the function invocation. ... pointers to "C strings", ... except that the last element of the array has a null pointer value. ...
      (comp.std.c)