xref: /original-bsd/usr.bin/f77/libI77/test/nmlist.f (revision a8414ee1)
1C
2C Copyright (c) 1980 The Regents of the University of California.
3C All rights reserved.
4C
5C %sccs.include.proprietary.f%
6C
7C	@(#)nmlist.f	5.2 (Berkeley) 04/12/91
8C
9
10	call tstil
11	call tstch
12	call tstrd
13	call tstcmp
14	end
15	subroutine tstil
16c		test integers and logicals
17	integer ivec(8)
18	logical lvec(6), l1, l2
19
20	namelist /nml/ key, ii, ivec, l1, l2, lvec
21	data ii/-1/, ivec/8*2/, lvec/6*.false./, l1/.false./, l2/.false./
22
23	print '(//"test integers and logicals...")'
2410	continue
25	read(*,nml)
26	print nml
27	if(key.lt.0) return
28	go to 10
29	end
30
31	subroutine tstch
32	character ch, chvec(12), str*10, strv(-1:4)*5
33	namelist /nmc/ key, ch, chvec, str, strv
34	data ch/'+'/, chvec/12*'-'/, str/'+..-..-..+'/, strv/6*':...:'/
35
36	print '(//"test characters and strings...")'
3710	continue
38	read(*,nmc)
39	print nmc
40	if(key.lt.0) return
41	go to 10
42
43	end
44
45	subroutine tstrd
46	real r, rvec(10)
47	double precision d, darr(-10:-8, 0:1, 1:2)
48	namelist /nmrd/ key, r,d, rvec, darr
49
50	print '(//"test reals and doubles...")'
5110	continue
52	read(*,nmrd)
53	print nmrd
54	if(key.lt.0) return
55	go to 10
56
57	end
58
59	subroutine tstcmp
60	complex c, cvec(6)
61	double complex z, zvec(6)
62	namelist /nmcmp/ key, c,cvec,z,zvec
63
64	print '(//"test complex and double complex...")'
6510	continue
66	read(*,nmcmp)
67	print nmcmp
68	if(key.lt.0) return
69	go to 10
70
71	end
72