Email discussion lists for the UK Education and Research communities

## COMP-FORTRAN-90@JISCMAIL.AC.UK

#### View:

 Message: [ First | Previous | Next | Last ] By Topic: [ First | Previous | Next | Last ] By Author: [ First | Previous | Next | Last ] Font: Proportional Font

#### Options

Subject:

Re: Extended array operations

From:

Van Snyder <[log in to unmask]>

Reply-To:

Fortran 90 List <[log in to unmask]>

Date:

Tue, 6 Nov 2018 09:24:22 -0800

Content-Type:

text/plain

Parts/Attachments:

 text/plain (62 lines)
 ```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" @[log in to unmask]> > > 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 array1(1:d) > > would be array-array operations of the kind: > > array3(1:d1*d2) = array1(1:d1) 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```

#### RSS Feeds and Sharing

JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice