Subject: Examples of alternative PASS_OBJ syntax J3/02-201r1 From: Kurt W. Hirchert (Meeting 161) 16 May 2002 Below are some examples of the original PASS_OBJ syntax, the syntax resulting from the adoption of 02-167r1, and a syntax I believe reflects the suggestions of Rich Maine in premeeting e-mail: ! type-bound procedure bound to module procedure of same name with ! the first argument as the passed-object dummy argument PROCEDURE,PASS_OBJ::name ! old PROCEDURE::name ! new PROCEDURE,PASS::name ! new - variant PROCEDURE::name(*) ! Maine PROCEDURE::name(self=*) ! Maine - variant ! type-bound procedure bound to module procedure of different name ! with the first argument as the passed-object dummy argument PROCEDURE,PASS_OBJ::name=>other ! old PROCEDURE::name=>other ! new PROCEDURE::name=>other(*) ! Maine ! type-bound procedure with deferred binding and the first argument ! as the passed-object dummy argument PROCEDURE(abstract),PASS_OBJ::name=>NULL() ! old PROCEDURE(abstract)::name=>NULL() ! new PROCEDURE(abstract(*))::name=>NULL() ! Maine ! type-bound procedure when no passed-object dummy argument possible PROCEDURE::name ! old PROCEDURE::name ! new PROCEDURE,NOPASS::name ! new - variant PROCEDURE::name ! Maine ! type-bound procedure when passed-object dummy argument possible ! but not wanted PROCEDURE::name ! old PROCEDURE,NOPASS::name ! new PROCEDURE::name ! Maine ! type-bound procedure with the passed-object dummy argument ! being an argument other than the first, but the first possible PROCEDURE,PASS_OBJ::name ! old PROCEDURE,PASS(self)::name ! new PROCEDURE::name(self=*) ! Maine ! type-bound procedure with the passed-object dummy argument ! not being the first possible ! <> ! old PROCEDURE,PASS(self)::name ! new PROCEDURE::name(self=*) ! Maine ! Procedure pointer component examples look like type-bound procedure ! examples with the POINTER attribute added. ! Many of the generic type-bound procedure examples would look like ! the ordinary type-bound procedure examples with GENERIC replacing ! PROCEDURE. Two other examples follow. ! type-bound generic with two specifics; both specifics use the ! same dummy argument as the passed-object dummy argument GENERIC,PASS_OBJ::generic=>name1,name2 ! old GENERIC,PASS(self)::generic=>name1,name2 ! new GENERIC::generic=>name1,name2 ! new - best case GENERIC::generic=>name1(self=*),name2(self=*) ! Maine GENERIC::generic=>name1(*),name2(*) ! Maine - best case ! type-bound generic with two specifics; different dummy arguments ! used as the passed-object dummy argument GENERIC,PASS_OBJ::generic=>name1,name2 ! old, when possible GENERIC,PASS(left)::generic=>name1; GENERIC,PASS(right):: & & generic=>name2 ! new GENERIC::generic=>name1(left=*),name2(right=*) ! Maine - end -