![]() |
|< 1 2 3 4 5 6 >| | ![]() |
51 Einträge, 6 Seiten |
if ( ((( (a and b) or (c and d) ))) or e ) {...}
if ( ( a and b or c and d ) or e ) {}
( a or b ) or c
a or b or c
if ( a and b or c and d or e ) {}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
use strict;
use warnings;
for my $a (0,1) {
for my $b (0,1) {
for my $c (0,1) {
print "a=$a, b=$b, c=$c\n";
print "true1\n" if ($a and $b) or $c;
print "true2\n" if ($a and $b) || $c;
print "true3\n" if $a and $b or $c;
}
}
}
"test.pl" 13 lines, 265 characters
peters@ronin:~> perl test.pl
a=0, b=0, c=0
a=0, b=0, c=1
true1
true2
true3
a=0, b=1, c=0
a=0, b=1, c=1
true1
true2
true3
a=1, b=0, c=0
a=1, b=0, c=1
true1
true2
true3
a=1, b=1, c=0
true1
true2
true3
a=1, b=1, c=1
true1
true2
true3
![]() |
|< 1 2 3 4 5 6 >| | ![]() |
51 Einträge, 6 Seiten |