main
| Line | |
|---|
| 1 | c Fortran 77 Standard Sec. 11.10, DO_Statement
|
|---|
| 2 | c Loops with strieded counter
|
|---|
| 3 | program p
|
|---|
| 4 | implicit none
|
|---|
| 5 | integer counter, lower, upper, stride, testvar
|
|---|
| 6 |
|
|---|
| 7 | c Initial counter value should not matter
|
|---|
| 8 | counter = 100000
|
|---|
| 9 | testvar = 0
|
|---|
| 10 | lower = 5
|
|---|
| 11 | upper = 20
|
|---|
| 12 | stride = 5
|
|---|
| 13 | do 100, counter=lower,upper,stride
|
|---|
| 14 | testvar = testvar + 1
|
|---|
| 15 | c none of the below should change the number of iterations
|
|---|
| 16 | lower = -10
|
|---|
| 17 | upper = 5000
|
|---|
| 18 | stride = 2
|
|---|
| 19 | 100 continue
|
|---|
| 20 | c$ civl assert(counter==25)
|
|---|
| 21 | c$ civl assert(testvar==4)
|
|---|
| 22 | end program
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.