On Wed, 2018-11-07 at 01:32 +1100, Robin Vowels wrote:
> what would you expect to happen when D1 /= D2 ?
Since the dimension of the variable in the assignment is d1*d2, I'd
guess the operation is an outer product. That's the only one I've ever
seen to be useful in a combination of an array of size d1 with an array
of size d2 to produce an array of size d1*d2. Some languages have an
outer-product operator, but it produces an array of higher rank, not one
of the same rank with larger dimension.
As Steve pointed out, you can define one yourself. You just can't use
the syntax of an intrinsic operator to operate on objects of intrinsic
type.
But the question was indeed vague.
>
>
>
> ----- Original Message -----
> From:
> "Fortran 90 List" @jiscmail.ac.uk>
>
> To:
> <[log in to unmask]>
> Cc:
>
> Sent:
> Tue, 6 Nov 2018 19:18:47 +0530
> Subject:
> Extended array operations
>
>
> A logical extension of the extremely convenient array syntax
> that allows us to
> perform computations like:
>
> array2(1:d) = scalar <operation> array1(1:d)
>
> would be array-array operations of the kind:
>
> array3(1:d1*d2) = array1(1:d1) <operation> array2(1:d2)
>
> or maybe with a dimension upgrade, with some convention on the
> ordering, say
> column ordered with the first array being the fastest changing
> index (because
> we like that).
>
>
>
> ______________________________________________________________________
>
> To unsubscribe from the COMP-FORTRAN-90 list, click the following
> link:
> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=COMP-FORTRAN-90&A=1
>
########################################################################
To unsubscribe from the COMP-FORTRAN-90 list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=COMP-FORTRAN-90&A=1
|