- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, and thanks in advance for the help
I am porting some code from Linux and am purturbed that the following, which worked with the Portland Group Compiler for the case when L=0, does not work now:
IF(L .GT. 200 .AND. AERO(L) .GT. 2.0) THEN
CALL ....................
ENDIF
In IVF, I must apparently to do this, otherwise it complains about AERO(0):
IF(L .GT. 200 ) THEN
IF( AERO(L) .GT. 2.0) THEN
CALL ....................
ENDIF
ENDIF
Does IVF always check all conditions in an IF, even when the first one fails? I’m going to have to do a lot of rework if true. Someone in the office suggested turning off subscript error checking, but I still want to able able to trap other instances of subscript out of bounds. Is there a flag to make IVF stop checking when it finds a false IF condition?
Thanks
Andy
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is a language requirement that Fortran to be able to check in any order and check all logical (sub) expressions. Sorry, you will have to use the THEN. I advise against relying on turning off subscript checking. That will trip you up at times (bogus index producing SIGSEV for invalid memory access).
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Jim
I may have preferred a different answer, but now I have it. In any case, I'll have more robust code.
Thanks!
Andy
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page