- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Line 10 generates three errors, none of which make any sense.
It says the number of arguments in the call don't match, and it doesn't like the
type of the argument "nmove."
I think the problem arises from passing the NMOVE dummy argument down from line #1.
===================================================
subroutine box_moves(coord,nsq,nmove,moves)
integer*2 nsq,nmove,nmove2
integer*1 moves(*),buf(1200),buf2(1200),coord(12,*),iterno
nmove=coord(3,1)
kk=1
do imove=1,nmove
buf(imove)=coord(2+imove,1)
end do
do iterno=2,nsq
call box_iter(coord, iterno, nmove, buf, nmove2, buf2)
end do
end subroutine
subroutine box_iter(coord,iterno,nmove,buf,nmove2,buf2)
integer*2 nmove,nmove2
integer*1 buf(1200),buf2(1200),iterno,coord(12,8)
integer*2 kin/0/,kout/0/,avail(8),tiles(8)
logical*1 choose,reject
navail=coord(3,iterno)
do 4 jj=1,iterno
4 avail(jj)=coord(3+jj,iterno)
ntile=iterno-1
nmove2=0
do imove=1,nmove
! pick out tiles used in this move
do 5 jj=1,ntile
5 tiles(jj)=buf(kin+jj)
do iavail=1,navail
choose=.true.
do itile=1,ntile
if(avail(iavail).eq.tiles(itile))choose=.false.
end do
< font size="2">if(choose)then
! copy all the moves with tiles that are NOT used
do kk=1,ntile
kout=kout+1
kin=kin+1
buf2(kout)=buf(kin)
end do
nmove2=nmove2+1
kout=kout+1
buf2(kout)=avail(iavail)
end if
end do
end do !imove
print *,"output moves: nmove2=",nmove2
end subroutine
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'll take a wild guess.
Since you are getting an argument match error, I presume you're using the generate/check interface options. Did you change the argument list at some point? If so, thencheck the generated interface. You will probably find that it has not been updated to match the argument list changes. Part of the reason for this is that the caller routine precedes the callee in the source file, although there are a few more mysteries that I don't yet understand. The quick fix, though, isto simply delete the .mod files and recompile. That, by the way, often corrects cryptic problems using interface checking.whether you understand them or not.
At least, it does for me.
Bruce
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page