source: CIVL/examples/fortran/devExamples/computedGoto_doLoop_Sample.f@ c354e1d

1.23 2.0 acw/focus-triggers main test-branch
Last change on this file since c354e1d was 9960433, checked in by Wenhao Wu <wuwenhao@…>, 10 years ago

Add comments to two fortran examples

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@3136 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 565 bytes
Line 
1 subroutine test(size,array,case)
2 integer size, case, i, n
3 double precision sum
4 double precision array(size)
5
6 !This file is used to test the translation of
7 !computed goto statement and do loop statement
8
9 sum = 0.0d0
10 n = 10
11 go to (10,30), case
12 10 continue
13 do 11 i = 1, n, 2
14 sum = 1.0d0
15 11 continue
16 do 12 i = 1, n
17 sum = 2.0d0
18 12 continue
19 go to 50
20
21 30 continue
22 sum = 0.0d0
23 go to 50
24
25 50 continue
26 return
27
28 END
29
Note: See TracBrowser for help on using the repository browser.