|
|
1.1 root 1: call tstil
2: call tstch
3: call tstrd
4: call tstcmp
5: end
6: subroutine tstil
7: c test integers and logicals
8: integer ivec(8)
9: logical lvec(6), l1, l2
10:
11: namelist /nml/ key, ii, ivec, l1, l2, lvec
12: data ii/-1/, ivec/8*2/, lvec/6*.false./, l1/.false./, l2/.false./
13:
14: print '(//"test integers and logicals...")'
15: 10 continue
16: read(*,nml)
17: print nml
18: if(key.lt.0) return
19: go to 10
20: end
21:
22: subroutine tstch
23: character ch, chvec(12), str*10, strv(-1:4)*5
24: namelist /nmc/ key, ch, chvec, str, strv
25: data ch/'+'/, chvec/12*'-'/, str/'+..-..-..+'/, strv/6*':...:'/
26:
27: print '(//"test characters and strings...")'
28: 10 continue
29: read(*,nmc)
30: print nmc
31: if(key.lt.0) return
32: go to 10
33:
34: end
35:
36: subroutine tstrd
37: real r, rvec(10)
38: double precision d, darr(-10:-8, 0:1, 1:2)
39: namelist /nmrd/ key, r,d, rvec, darr
40:
41: print '(//"test reals and doubles...")'
42: 10 continue
43: read(*,nmrd)
44: print nmrd
45: if(key.lt.0) return
46: go to 10
47:
48: end
49:
50: subroutine tstcmp
51: complex c, cvec(6)
52: double complex z, zvec(6)
53: namelist /nmcmp/ key, c,cvec,z,zvec
54:
55: print '(//"test complex and double complex...")'
56: 10 continue
57: read(*,nmcmp)
58: print nmcmp
59: if(key.lt.0) return
60: go to 10
61:
62: end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.