数组赋值,报错
以下为代码
[Fortran] 纯文本查看 复制代码 program main
implicit none
CALL QW
c(1:N,1:N)=a(:,:)
c(1:N,N+1:2*N)=b(:,:)
c(N+1:2*N,1:N)=b(:,:)
c(N+1:2*N,N+1:2*N)=a(:,:)
write(*,*) c
end program main
SUBROUTINE QW
integer, parameter :: N=4
integer,dimension(N,N) :: a
integer,dimension(N,N) :: b
integer,dimension(2*N,2*N) :: c
integer :: i,j
do i=1,N
do j=1,N
a(i,j)=1
end do
end do
do i=1,N
do j=1,N
b(i,j)=2
end do
end do
END SUBROUTINE QW
以下为错误
1>D:\单相土三维\┐(T.T ) ( T.T) ノ\┐(T.T ) ( T.T) ノ\kk.f90(209): error #6911: The syntax of this substring is invalid. [C]
|