fortran - Error: This name does not have a type, and must have an explicit type -
here code:
program fortran_project1 implicit none integer:: real*4:: norm integer,parameter:: n=5 real*4,dimension(n)::x0,norm_x0 write(*,*) 'parametrhaye matrix x0 ra vared konid' norm=0 i=1,n read(*,*) x0(i) norm=norm + x0(i)**2 enddo norm=sqrt(norm) norm_x0(:)=1.0d0 i=1,n norm_x0(i)=x(i)/norm enddo write(*,'(a,\)') 'x0=' write(*,'(f,\)') (x0(i),i=1,n-1) write(*,'(f)') x(n) write(*,'(a5,x,f)') 'norm_x0=',norm write(*,'(a7,\)') 'norm_x0=' i=1,n-1 write(*,'(2x,f8.6,\)') norm_x0 enddo write(*,'(2x,f8.6)') norm_x0 endprogram fortran_project1 error:
--------------------configuration: f5 - win32 debug-------------------- compiling fortran... c:\fortran\f5\f5.f90 c:\fortran\f5\f5.f90(16) : error: name not have type, , must have explicit type. [x] norm_x0(i)=x(i)/norm -------------------^ error executing df.exe. f5.obj - 1 error(s), 0 warning(s)
from compaq compiler. need help, how can fix error?
you have "program fortran_project1 / implicit none" twice, confusing compiler. several non-standard syntax items. variable x undeclared.
Comments
Post a Comment