> On Jun 7, 2017, at 9:37 PM, Robin Vowels <[log in to unmask]> wrote:
>
> From: "Bill Long" <[log in to unmask]>
> Sent: Wednesday, June 07, 2017 1:10 AM
>
>
>> Yes, these are complications. But I think a simplified version could be specified that would accomplish what is desired. For example
>
>> COMPLEX(X,Y)
>
>> Require that X and Y be of type REAL or INTEGER, at least one of X or Y be type REAL.
>
> Let's not have another exception. Arguments for CMPLX can be integer.
The arguments for CMPLX can also be boz constants. The goal here is a simple spec for COMPLEX, which is not the same as CMPLX. I assume that CMPLX with both arguments integer already does what you want, so there is no need for COMPLEX to cover that case.
>
>> The KIND of the result would be KIND(X+Y).
>
> KIND(X+Y) ???
Yes, KIND(X+Y). For X and Y numeric types, the KIND of the expression X+Y is well defined and matches what is wanted here. It is a lot simpler to just say KIND(X+Y) than to repeat the already-stated rules for computing the KIND of the result when the kinds or types of X and Y don’t match.
Cheers,
Bill
>
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
Bill Long [log in to unmask]
Principal Engineer, Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9143
Cray Inc./ 2131 Lindau Lane/ Suite 1000/ Bloomington, MN 55425
|