Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

error #6659: Not an attribute-spec keyword [INPUT]

milenko1976
Beginner
1,629 Views
I do not know where is the problem.My code:
program svs

implicit none

integer :: v,x,y
integer,dimension(7,7) :: a

do v=1,10

select case(v)
case(1)
x=-4
y=4
call calcsts(x,y)
call wa(v)
case(2)
x=-3
y=3
call calcsts(x,y)
call wa(v)
case(3)
x=-2.667
y=2.667
call calcsts(x,y)
call wa(v)
case(4)
x=-5
y=5
call calcsts(x,y)
call wa(v)
case(5)
x=-2
y=2
call calcsts(x,y)
call wa(v)
case(6)
x=-3
y=3
call calcsts(x,y)
call wa(v)
case(7)
x=-3
y=3
call calcsts(x,y)
call wa(v)
case(8)
x=-4
y=4
call calcsts(x,y)
call wa(v)
end select

end do

end

subroutine calcsts(x,y)

integer,dimension(7,7) :: a
integer :: i,j
integer,intent(in) :: x,y

do i=1,7
do j=1,6

if (i==j) then
a(i,j)=x
else if ((i-1)==j) then
a(i,j)=y
else
a(i,j)=0
end if

end do
end do

do i=1,7
do j=7,7
a(i,j)=0
end do
end do

end subroutine

subroutine wa(v)

data dfile/'ma .horiz'/
character dfile*10
integer :: id1,id2
integer,input(in) :: v
integer,dimension(7,7) :: a

id1=v/10
id2=v-id1*10
dfile(3:4)=char(id1+48)//char(id2+48)
open(209, file=dfile, form='formatted',status='unknown')
write(209,100)a
100 format(7i3)

end subroutine

0 Kudos
2 Replies
mecej4
Honored Contributor III
1,629 Views
Instead of

integer,input(in) :: v

write

integer, intent(in) :: v

The compiler did tell you which line was in error, did it not?
0 Kudos
milenko1976
Beginner
1,629 Views
Thanks mecej.I changed code sveral times,lack of concentration.
0 Kudos
Reply