-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathlogic.html
More file actions
199 lines (199 loc) · 5.85 KB
/
Copy pathlogic.html
File metadata and controls
199 lines (199 loc) · 5.85 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta content="App Inventor for Android" name="description" />
<meta content="Android, Blocks App Inventor, Mobile, Phone, IDE" name="keywords" />
<title>
Logic Blocks - App Inventor for Android
</title>
<link href="/static/images/appinventor-16.png" rel="SHORTCUT ICON" type="image/ico" />
<link href="/static/images/appinventor-16.png" rel="icon" type="image/png" />
<link href="/static/css/appinventor.css" rel="stylesheet" />
<script src="http://www.google.com/js/gweb/analytics/autotrack.js">
</script>
<script>
var tracker = new gweb.analytics.AutoTrack({
profile: 'UA-5856106-2'
});
</script>
<script language = "JavaScript" src="/static/scripts/HeaderAndFooter.js"></script>
<link href="test.css" rel="stylesheet" />
<style>
img.c2 {border-width:0}
div.c1 {clear:both;}
</style>
</head>
<body>
<script language = "JavaScript">createHeader('<div id="navigation-breadcrumb"> <a href="/learn/">Learn</a> > <a href="/learn/reference/">Reference</a> > Logic Blocks > ');</script><br>
<div id="aiac">
<div class="main-container">
<div class="customhr customhr-gray">
</div>
<div class="content">
<div class="content-body">
<div class="learn-page">
<h2>
Logic Blocks
</h2>
<ul>
<li>
<a href="#true">
true
</a>
</li>
<li>
<a href="#false">
false
</a>
</li>
<li>
<a href="#not">
not
</a>
</li>
<li>
<a href="#equals">
=
</a>
</li>
<li>
<a href="#and">
and
</a>
</li>
<li>
<a href="#or">
or
</a>
</li>
</ul>
<h3 id="true">
true
</h3>
<img alt="" src="images/true.png" />
<p>
This block represents the constant value
<code>
true
</code>
. Use it for setting
boolean property values of components, or as the value of a variable that
represents a condition.
</p>
<h3 id="false">
false
</h3>
<img alt="" src="images/false.png" />
<p>
This block represents the constant value
<code>
false
</code>
. Use it for setting
boolean property values of components, or as the value of a variable that
represents a condition.
</p>
<h3 id="not">
not
</h3>
<img alt="" src="images/not.png" />
<p>
This block performs logical negation, returning false if the input is true, and
true if the input is false.
</p>
<h3 id="equals">
equals
</h3>
<img alt="" src="images/equals.png" />
<p>
This block tests whether its arguments are equal.
</p>
<ul>
<li>
Two numbers are equal if they are numerically equal, for example, 1 is equal to
1.0.
</li>
<li>
Two text blocks are equal if they have the same characters in the same order,
with the same case. For example,
<code>
banana
</code>
is not equal to
<code>
Banana
</code>
.
</li>
<li>
Numbers and text are equal if the number is numerically equal to a number that
would be printed with that text. For example, 12.0 is equal to the result of
joining the first character of
<code>
1A
</code>
to the last character of
<code>
Teafor2
</code>
.
</li>
<li>
Two lists are equal if they have the same number of elements and the
corresponding elements are equal.
</li>
</ul>
<h3 id="and">
and
</h3>
<img alt="" src="images/and.png" />
<p>
This block tests whether all of a set of logical conditions are true. The result is
true if and only if all the tested conditions are true. When you plug a condition
into the
<code>
test
</code>
socket, another socket appears so you can add another
condition. The conditions are tested left to right, and the testing stops as soon
as one of the conditions is false. If there are no conditions to test, then the
result if true. You can consider this to be a logician's joke.
</p>
<h3 id="or">
or
</h3>
<img alt="" src="images/or.png" />
<p>
This block tests whether any of a set of logical conditions are true. The result is
true if one or more of the tested conditions are true. When you plug a condition
into the
<code>
test
</code>
socket, another socket appears so you can add another
condition. The conditions are tested left to right, and the testing stops as soon
as one of the conditions is true. If there are no conditions to test, then the
result is false.
</p>
</div>
</div>
</div>
<div class="footer">
<script language = "JavaScript">createFooter();</script><br>
<div class="footer-lastupdate">
<script>
if (document.lastModified != '') {
var m = "Page last updated: " + document.lastModified;
var p = m.length-8;
document.writeln("<center>");
document.write(m.substring(p, 0));
document.writeln("<\/center>");
}
</script>
</div>
</div>
</div>
</div>
</body>
</html>