(j3.2006) C713 question

Craig Dedo craig at ctdedo.com
Tue Mar 31 17:07:36 EDT 2009


Van and Everyone Else:
	This constraint has been part of the Fortran standard since array
assignment was developed with Fortran 90.  Here are the various references.
	Standard		Section	Rule		Page & Lines
	Fortran 90		7.5.1.1	R735		[89:10-12]
	Fortran 95		7.5.1.1	R735 		[107:20-22]
	Fortran 2003	7.4.1.1	R734(C715)	[140:11-13]

	Perhaps one of the persons who was in on the development of Fortran
90 may know the answer to your question.  Walt Brainerd and Jeanne Martin,
do you know or know of anyone who does know?

	Here is my guess as to the reason for the restriction.  Notice that
this restriction is for **assumed-SIZE**, not **assumed-SHAPE**.
Assumed-size is an F77 feature; assumed-shape is F90.

	Thus, passing an actual argument to an assumed-SIZE dummy can use an
implicit procedure interface, which means that the extent is not known by
the compiler.  It can only be computed by using the SIZE() intrinsic at run
time.

	In contrast, passing an actual argument to an assumed-SHAPE dummy
needs to use an EXPLICIT procedure interface, so the compiler has sufficient
information to know what to do with it.  

	Thus, doing assignment, intrinsic or defined, to an assumed-SIZE
variable can involve serious or impossible complications for the compiler.
Due to the requirement for an explicit interface, these complications do not
exist for assignment to an assumed-SHAPE variable.

Sincerely,
Craig Dedo
17130 W. Burleigh Place
P. O. Box 423                       
Brookfield, WI   53008-0423  
USA                                     Mobile Phone:  (414) 412-5869
E-mail:  <craig at ctdedo.com>

> -----Original Message-----
> From: j3-bounces at j3-fortran.org [mailto:j3-bounces at j3-fortran.org] On
> Behalf Of Van Snyder
> Sent: Tuesday, March 31, 2009 15:05
> To: j3
> Subject: (j3.2006) C713 question
> 
> C713 at [09-007r2:155:4 7.2.1.1] says that the <variable> in an
> <assignment-stmt> cannot be a whole assumed-size array.
> 
> It would seem to be OK in the case of defined assignment.
> 
> Did we intend this?
> 
> Does this need to be decided by an interp, or would applying it only
> for
> intrinsic assignment be a simple new feature?
> 
> Van Snyder
> 
> 
> _______________________________________________
> J3 mailing list
> J3 at j3-fortran.org
> http://j3-fortran.org/mailman/listinfo/j3



More information about the J3 mailing list