- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The do construct
DO I=1,ISTOP,ISTEP
.
.
ENDDO
is expecteed to do to a number of loops given by:
MAX=(ISTOP-ISTART+STEP)/ISTEP
For the case ISTOP =0,ISTEP=1, MAX = (0-1+1)/1 = 0
In my code used to be compiled by CVF, this worked as presumed,
but with IVF the loop will be executed once. Why?
Is there any compiler switch to be set to avoid this?
Regards
Reidar
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
onetrip, Qonetrip
Tells the compiler to follow the FORTRAN 66 Standard and execute DO loops at least once.
IDE Equivalent
None
Architectures
IA-32 architecture, Intel 64 architecture, IA-64 architecture
Syntax
Linux and Mac OS X: | -onetrip |
Windows: | /Qonetrip |
Arguments
None
Default
OFF | The compiler applies the current Fortran Standard semantics, which allows zero-trip DO loops. |
Description
This option tells the compiler to follow the FORTRAN 66 Standard and execute DO loops at least once.
Alternate Options
Linux and Mac OS X: -1
Windows: /1
- 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
Minor quibble: Fortran 66 did not specify that loops should be executed at least once. That was an extension implemented by certain compilers, not always reliably. The form later adopted by f77 was already implemented successfully by certain compilers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As advised, the solution was to select Project from the menu, then
MyProject Property Pages -> Fortran -> Language and set the
Enable Fortran 66 semantics switch to No
My DO-loops are now running as usual..
Thanks to all of you!
Best regards
Reidar

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page