home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
adaptor.zip
/
adapt.zip
/
adaptor
/
examples
/
dalib
/
reduct
/
bool.f
next >
Wrap
Text File
|
1993-03-23
|
751b
|
41 lines
program test
integer k
parameter (k = 3)
logical a(k)
a(1) = .true.
a(2) = .false.
a(3) = .true.
call alltest (a, k, .false.)
call anytest (a, k, .true.)
call paritytest (a, k, .false.)
end
subroutine alltest (a, N, result)
logical a(n), s, result
s = all (a)
print *, 'ALL: Result is ', s, ' should be ', result
end
subroutine anytest (a, N, result)
logical a(n), s, result
s = any (a)
print *, 'ANY: Result is ', s, ' should be ', result
end
subroutine paritytest (a, N, result)
logical a(n), s, result
s = parity (a)
print *, 'PARITY: Result is ', s, ' should be ', result
end