|
|
1.1 root 1: c subroutine tst4
2: parameter(ntest=4)
3: c Boolean expressions
4: c common /t4/ p,q,r
5: logical p,q,r
6: logical yes,no
7: parameter(yes=.true., no=.false.)
8: if ( .not. yes .eqv. .true. ) call e(1,ntest)
9: if ( .not. no .eqv. .false. ) call e(2,ntest)
10: if ( yes .eqv. no ) call e(3,ntest)
11: if ( .not. .true. .eqv. .not. .false. ) call e(4,ntest)
12: if ( .true. .and. .false. ) call e(5,ntest)
13: if ( .false. .or. .false. ) call e(6,ntest)
14:
15: p=.true.
16: q=.true.
17: r=.false.
18: if ( .not. p ) call e(7,ntest)
19: if ( r ) call e(8,ntest)
20: if ( p .and. r ) call e(9,ntest)
21: if ( p .and. .not. q ) call e(10,ntest)
22: if ( .not. p .or. .not. q ) call e(11,ntest)
23: if ( (p .and. r) .or. (q .and. r) ) call e(12,ntest)
24: if ( p .and. q .and. r ) call e(13,ntest)
25: if ( (p .or. q) .eqv. r ) call e(14,ntest)
26: end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.