- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My program runs with debug, but when I switch to release it gives me an access violation error!! there is nothing written on the window, so I don't know which subroutine is making the problem?
can you confirm this? I have uploaded the files, let me know what am I doing wrong?
can you confirm this? I have uploaded the files, let me know what am I doing wrong?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are several circumstances in which the caller(s) of a subroutine/function must have available an explicit interface to the callee. One of them is when some of the subprogram arguments are assumed-size or allocatable, for example the call to INITIAL in the main program.
Compile with the /warn option to make the compiler detect and report the problems.
Compile with the /gen-interfaces /warn:interfaces options to have the compiler automatically generate the interfaces and use them. You will see numerous warnings of
Required interface for passing assumed shape array is missing from original source.
I recommend that you use the interfaces that the compiler produces as a basis and incorporate the interfaces into your source code.
Compile with the /warn option to make the compiler detect and report the problems.
Compile with the /gen-interfaces /warn:interfaces options to have the compiler automatically generate the interfaces and use them. You will see numerous warnings of
Required interface for passing assumed shape array is missing from original source.
I recommend that you use the interfaces that the compiler produces as a basis and incorporate the interfaces into your source code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If I don't want to manually write the interface I have to pass the dimensions as arguments?
for example like:
subourine test(A,B,im,jm)
integer::im,jm
real::A(im,jm),B
end subroutine
this does not needs explicit interface?
for example like:
subourine test(A,B,im,jm)
integer::im,jm
real::A(im,jm),B
end subroutine
this does not needs explicit interface?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
An implicit interface is sufficient when the array arguments have "assumed size", as in your example.
However, it is typically the case that an array argument such as A is dimensioned in the caller as A(imax, jmax), where imax > im. In such cases, it is necessary to pass both imax and im as arguments to the subroutine.
Since Fortran uses column-major order for 2-D arrays, jmax need not be passed to the subroutine.
However, it is typically the case that an array argument such as A is dimensioned in the caller as A(imax, jmax), where imax > im. In such cases, it is necessary to pass both imax and im as arguments to the subroutine.
Since Fortran uses column-major order for 2-D arrays, jmax need not be passed to the subroutine.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page