Advertisement
Guest User

fortran issue

a guest
Jan 18th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. 0
  2. down vote
  3. favorite
  4.  
  5.  
  6. I am using intel fortran compiler. In old compaq visual fortran this code worked properly:
  7.  
  8. SUBROUTINE SOMESUB(N,D)
  9. IMPLICIT NONE
  10. INTEGER N,I
  11. REAL(4) D(N) !D - array of N elements
  12. DO i=1,N
  13. D(i)=1.
  14. END DO
  15. RETURN
  16. END SUBROUTINE
  17.  
  18. PROGRAM MAIN
  19. REAL(4) A !Just real variable
  20. CALL SOMESUB(1,A)
  21.  
  22. Now in intel fortran that code is not working. I tried use CALL SOMESUB(1,[A]), but it also did not work. How I can use one subroutine for passing arrays and general variables with intel fortran,desirably with least changes in legacy code?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement