zhangzl 发表于 2006-3-26 10:38

[求助]Fortran 90 编译问题

<P>下面是一个算矩阵相乘的模块,是我在《Fortran 90 for Scientists and Engineers&gt;中看到的,但我运行之后发现有问题,请哪位高手指点一下,告知那里有误.谢谢!<br>module matmult</P>
<P>type matrix<br>   real::elt<br>end type matrix</P>
<P>interface operator(*)<br>module procedureMatTimesMat , ScalarTimesMat<br>end interface</P>
<P>contains <br>FUNCTION MatTimesMat( A, B )<br>TYPE (MATRIX), DIMENSION(:,:),intent(in) :: A, B<br>TYPE (MATRIX), DIMENSION( SIZE(A,1), SIZE(B,2) ) :: MatTimesMat<br><br>INTEGER I, J, EM <br>   <br>EM = SIZE(A,2)   ! columns of A must equal rows of B<br>DO I = 1, SIZE(A,1)! rows of A<br>DO J = 1, SIZE(B,2) ! columns of B<br>   MatTimesMat(I,J) % Elt = SUM( A(I,1:EM) % Elt * B(1:EM,J) % Elt ) ! scalar product<br>end do<br>END DO<br>END FUNCTION <br>end module<br></P>
[此贴子已经被aspen于2006-3-31 22:26:02编辑过]

johhan 发表于 2006-3-29 19:44

你编译通过了没有呀?<BR><BR>你的编译环境是什么??

linjoo 发表于 2006-6-9 13:27

同样的问题

这个问题怎么办啊?<BR>编译问题。
页: [1]
查看完整版本: [求助]Fortran 90 编译问题