[code]
! begin of main()
implicit none
integer x, y
x= 1234
y= 4567
print *, 'x= ', x, ', y= ', y
pause
call swap_int(x, y)
print *, 'x= ', x, ', y= ', y
end
! -----------------------------------------------
! call swap_int(x, y)
subroutine swap_int(x, y)
implicit none
integer x, y, temp
temp= x
x= y
y= temp
end
[/code]
沒有留言:
張貼留言