xref: /csrg-svn/usr.bin/f77/libI77/test/nmlist.f (revision 47949)
1*47949SbosticC
2*47949SbosticC Copyright (c) 1980 The Regents of the University of California.
3*47949SbosticC All rights reserved.
4*47949SbosticC
5*47949SbosticC %sccs.include.proprietary.f%
6*47949SbosticC
7*47949SbosticC	@(#)nmlist.f	5.2 (Berkeley) 04/12/91
8*47949SbosticC
9*47949Sbostic
1043975Sbostic	call tstil
1143975Sbostic	call tstch
1243975Sbostic	call tstrd
1343975Sbostic	call tstcmp
1443975Sbostic	end
1543975Sbostic	subroutine tstil
1643975Sbosticc		test integers and logicals
1743975Sbostic	integer ivec(8)
1843975Sbostic	logical lvec(6), l1, l2
1943975Sbostic
2043975Sbostic	namelist /nml/ key, ii, ivec, l1, l2, lvec
2143975Sbostic	data ii/-1/, ivec/8*2/, lvec/6*.false./, l1/.false./, l2/.false./
2243975Sbostic
2343975Sbostic	print '(//"test integers and logicals...")'
2443975Sbostic10	continue
2543975Sbostic	read(*,nml)
2643975Sbostic	print nml
2743975Sbostic	if(key.lt.0) return
2843975Sbostic	go to 10
2943975Sbostic	end
3043975Sbostic
3143975Sbostic	subroutine tstch
3243975Sbostic	character ch, chvec(12), str*10, strv(-1:4)*5
3343975Sbostic	namelist /nmc/ key, ch, chvec, str, strv
3443975Sbostic	data ch/'+'/, chvec/12*'-'/, str/'+..-..-..+'/, strv/6*':...:'/
3543975Sbostic
3643975Sbostic	print '(//"test characters and strings...")'
3743975Sbostic10	continue
3843975Sbostic	read(*,nmc)
3943975Sbostic	print nmc
4043975Sbostic	if(key.lt.0) return
4143975Sbostic	go to 10
4243975Sbostic
4343975Sbostic	end
4443975Sbostic
4543975Sbostic	subroutine tstrd
4643975Sbostic	real r, rvec(10)
4743975Sbostic	double precision d, darr(-10:-8, 0:1, 1:2)
4843975Sbostic	namelist /nmrd/ key, r,d, rvec, darr
4943975Sbostic
5043975Sbostic	print '(//"test reals and doubles...")'
5143975Sbostic10	continue
5243975Sbostic	read(*,nmrd)
5343975Sbostic	print nmrd
5443975Sbostic	if(key.lt.0) return
5543975Sbostic	go to 10
5643975Sbostic
5743975Sbostic	end
5843975Sbostic
5943975Sbostic	subroutine tstcmp
6043975Sbostic	complex c, cvec(6)
6143975Sbostic	double complex z, zvec(6)
6243975Sbostic	namelist /nmcmp/ key, c,cvec,z,zvec
6343975Sbostic
6443975Sbostic	print '(//"test complex and double complex...")'
6543975Sbostic10	continue
6643975Sbostic	read(*,nmcmp)
6743975Sbostic	print nmcmp
6843975Sbostic	if(key.lt.0) return
6943975Sbostic	go to 10
7043975Sbostic
7143975Sbostic	end
72