|
fcode 发表于 2019-6-23 16:06
[mw_shl_code=fortran,true]integer::a(1,3)
a(1,:)=[1,2,3]
write(*,*) matmul(transpose(a),a)[/mw_shl_c ...
您好!您这个是用列*行得到一个3*3的数组,好像计算没问题。但如果调换顺序,计算行*列的时候,结果是14,直接write是可以的,但用变量表示就不行。请问是什么原因呢?
integer::k
k=matmul(a,transpose(a))
write(*,*) k
提示错误The shapes of the array expressions do not conform. [K]
|
|