File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / usr / src / usr.bin / f77 / f77pass1 / tst / t06.f
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:26:07 2019 UTC (7 years ago) by root
Branches: bsd, MAIN
CVS tags: v121, HEAD
Power 6/32 Unix version 1.21

c	subroutine tst6
	parameter(ntest=6)
c	Global arrays
c	common /t6/ a1,a2,a3,a4,a5,a6
	parameter(eps = 2.0e-7)
	integer yellow,blue
	parameter(yellow=2,blue=3)
	integer a1(-10:+10)
	real a2(1939:1945)
	logical a3(3)
	double precision a4(2)
	integer a5(50:52,2,0:1,1939:1945)
	character*1 a6(0:10,0:3,0:3)

	do 1 i= -10 , 10
1	a1(i) = i*i
	if ( (a1(-10).ne.100) .or. (a1(9).ne.81) ) call e(1,ntest)

	do 2 i=1939 , 1945
2	a2(i)=i-1938.5
	if ( (abs(a2(1939)-0.5) .gt. eps) .or. (abs(a2(1945)-6.5) .gt. eps) ) call e(2,ntest)

	a3(blue) = .true.
	a3(yellow) = .true.
	if ( (a3(blue).ne..true.) .or. (a3(yellow).ne..true.) ) call e(3,ntest)
	a3(blue) = .false.
	a3(yellow) = .false.
	if ( (a3(blue).ne..false.) .or. (a3(yellow).ne..false.) ) call e(4,ntest)

	a4(1)=1.5
	a4(2)=.001
	if ( (a4(1) .ne. 1.5) .or. (a4(2).ne..001 ) ) call e(5,ntest)

	do 3 i=1939 , 1945
3	a5(51,2,0,i)=300+i
	if ( a5(51,2,0,1940) .ne. 2240 ) call e(6,ntest)
	do 4 i=50 , 52
4	a5(i,1,1,1943)=200+i
	if ( (a5(50,1,1,1943) .ne. 250) .or. (a5(52,1,1,1943) .ne. 252) ) call e(7,ntest)

	do 5 i= -10 , 10
5	a1(i)= 0
	do 6 i= 0 , 10
6	a1(i / 2 + i / 2)= i+1
	if ((a1(0).ne.2) .or. (a1(5).ne.0) .or. (a1(8).ne.10) ) call e(8,ntest)

	do 7 i= 0 , 10
	do 7 j= 0 , 3
	do 7 k= 0 , 3
	if ( ( (i+j+k) / 2) * 2 .eq. i+j+k ) then
	a6(i,j,k)='e'
	else
	a6(i,j,k)='o'
	endif
7	continue
	if ( (a6(2,2,2).ne.'e') .or. (a6(2,2,3).ne.'o') .or. (a6(0,3,1).ne.'e') ) call e(9,ntest)
	end

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.