************************************************** J3/03-112 Date: 12 February 2003 To: J3 From: Aleksandar Donev Subject: Cloning via SOURCE Reference: J3-007R3, continuing part of 02-330r1 ************************************************** ______________________________________________________ Summary ______________________________________________________ When cloning an object via SOURCE in ALLOCATE we use intrinsic assignment (see 110:9-10). This makes no sense. Either we should simply say that the clone gets the value of the source (see 02-111 for this), *or* that defined assignment is used if there is one for the declared type of the source, and intrinsic otherwise. A vote is needed on these choices: 1. 110:9-10 Replace sentence: If the allocation is successful, source-variable is then assigned to allocate-object by defined assignment for the declared type of source-variable if such an assignment is accessible, or intrinsic assignment for objects whose declared type is the dynamic type of source-variable otherwise. 2. 110:9-10 Replace sentence: If the allocation is successful, the value of allocate-object is initialized to the value of source-variable. I choose number 2 since it simplifies implementation. If #1 is desired, then J3 should have accepted my proposal to introduce MOLD in ALLOCATE, since the user can issue an assignment statement: allocate-object=source-variable himself!