Nп/п : 33 из 100
 От   : gah4                                2:5075/128        31 авг 23 16:44:19
 К    : Lynn McGuire                                          31 авг 23 02:45:02
 Тема : Re: C++ to Fortran
----------------------------------------------------------------------------------
                                                                                 
@MSGID:
<dbba28ef-801e-48d4-b008-256d4dbc0f18n@googlegroups.com> 362ab07f
@REPLY: 5@dont-email.me> 986f8b2c
@REPLYADDR gah4 <gah4@u.washington.edu>
@REPLYTO 2:5075/128 gah4
@CHRS: CP866 2
@RFC: 1 0
@RFC-References: 1@dont-email.me>
<5fbb8dcc-d5b9-45a4-9d4f-23caeebc0778n@googlegroups.com> 1@dont-email.me>
<9b605c0b-c8a1-40eb-a73f-428377f906a5n@googlegroups.com> <ee5025c7-3121-4e6d-87a9-f54452f1c145n@googlegroups.com>
<258c15c6-7463-4d80-8326-0016c5a4ff1an@googlegroups.com> 1@dont-email.me>
<401e5a1f-91f2-4075-a910-ee8455b0fd93n@googlegroups.com> <1d7b21e4-fdd6-4977-bd4e-d923977629bfn@googlegroups.com>
<9b39c5f8-bcb9-4ef2-8b1b-cc0a6ec4e5een@googlegroups.com> 5@dont-email.me>
@RFC-Message-ID:
<dbba28ef-801e-48d4-b008-256d4dbc0f18n@googlegroups.com>
@TZUTC: -0700
@PID: G2/1.0
@TID: FIDOGATE-5.12-ge4e8b94
On Thursday, August 31, 2023 at 12:49:29 PM UTC-7, Lynn McGuire wrote:

(snip, I wrote)

> > You can do operations on structures, either by structure shape, 
> > so member by member, or by member name. 
 
> > Neither has made it to Fortran.

> I am confused, what are structure expressions ? 
 
> Just about every Fortran compiler supports the old Dec Structures from 
> the 1970s that never made it into the official language definition. I 
> am removing them from our code right now in fact as a part of my 4th 
> Intel Fortran port. 
 
Like array expressions, except structures instead of arrays.

You can have:

      A = B + C

where A, B, and C are arrays, added element by element.

PL/I will add structures member by member.
Or any other operation, as you would expect with arrays.

      Y = SQRT(X)

      F = SIN(G)**2 + COS(G)**2

It  can make more or less sense, depending on the types of the members.

      type :: vector
      real :: x, y, z
      end type

member by member operations should make enough sense in this case.



--- G2/1.0
 * Origin: usenet.network (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5058/104 5075/128
@PATH: 5075/128 5020/1042 4441



   GoldED+ VK   │                                                 │   09:55:30    
                                                                                
В этой области больше нет сообщений.

Остаться здесь
Перейти к списку сообщений
Перейти к списку эх