Program allo
Implicit none
integer :: A,ok,i,B,k
Real, Dimension (:,:), Allocatable :: note
Print*, "enter line A"
Read*, A
Print*, "enter range B"
Read* ,B
Allocate (note(A,B), STAT=ok)
If (ok/=0) then
print*, "failed"
STOP
end if
Do i=1,A
Do k=1,B
Read*, note(i,k)
End do
End do
print*,shape(note, /A,B/)
Deallocate (note)
End Program allo
当我正常编译时没有"形状"选项,它在一行上给我一个数组,我想要(A,B)数组。我试着塑造它以拥有我完美的桌子,但它给了我错误。