[Fortran] 纯文本查看 复制代码 program main
use imsl
implicit none
real a(3,3),b(3,2),C(2,3)
b(:,1)=1
c(1,:)=2
a=b(:,1).x.c(1,:)
write(*,*) a
end
显示这样的问题:Error: No matching user defined OPERATOR with the given type and rank has been defined. [X]
a=b(:,1).x.c(1,:) 为什么不能这样子写呢?下面的情况也是差不多的,
[Fortran] 纯文本查看 复制代码 program main
use imsl
implicit none
real a(3,3),a1(3,3),a2(3,3),b(3,1),C(1,3),temp
b(:,1)=1
c(1,:)=2
a1=b.x.c
a2=b.x.c
a=a1+a2
a=b.x.c
write(*,*) a
temp=c.x.b
write(*,*) temp
end
Error: The shapes of the array expressions do not conform. [TEMP]
temp=c.x.b
|