This file is indexed.

/usr/share/doc/sludge/SLUDGEDevKitHelp/Variable_Operations.html is in sludge-doc 2.2-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<TITLE>Variable Operations</TITLE>
  <link rel="stylesheet" type="text/css" href="style.css" />
</head>
<BODY>
<HR>
<div align="center"><img id="headerGraphic" src="images/sludge300.png" alt="SLUDGE"/></div>
<h2>Variable Operations</h2>
<HR>


<P>
The following operations are supported in SLUDGE:
</P>

<P>
<B>A + B</B>
</P>

<P>
If both values are numbers, the result is the total of the two numbers. If one value is not a number, the result is a string containing the string representation of the first value followed by the string representation of the second. For example, 1+2 is the number 3, whereas 1+&quot;2&quot; is the string &quot;12&quot;.
</P>

<P>
<B>A - B</B>
</P>

<P>
Both values must be numbers. The result is the first number minus the second.
</P>

<P>
<B>A * B</B>
</P>

<P>
Both values must be numbers. The result is the first number multiplied by the second.
</P>

<P>
<B>A / B</B>
</P>

<P>
Both values must be numbers. The result is the first number divided by the second. The second number cannot be 0.
</P>

<P>
<B>A % B</B>
</P>

<P>
Both values must be numbers. The result is the remainder when the first number is divided by the second (or the modulus). The second number cannot be 0.
</P>

<P>
<B>A &amp;&amp; B</B>
</P>

<P>
Both values are treated as boolean. The result is true if both values are TRUE, otherwise it is FALSE..
</P>

<P>
<B>A || B</B>
</P>

<P>
Both values are treated as boolean. The result is TRUE if either value is TRUE, otherwise it is FALSE.
</P>

<P>
<B>A = B</B>
</P>

<P>
Changes the value of A so that it now contains the same data as B. The same value is given as the result, meaning that the code A=B=C=D=E=8 will set all five variables to the numerical value 8.
</P>

<P>
<B>A == B</B>
</P>

<P>
The result is TRUE if both values are of the same type and if the contents match, otherwise it is FALSE.
</P>

<P>
<B>A != B</B>
</P>

<P>
The result is FALSE if both values are of the same type and if the contents match, otherwise it is TRUE.
</P>

<P>
<B>A &gt; B</B>
</P>

<P>
Both values must be numbers. The result is TRUE if the first number is greater than the second, otherwise it is FALSE.
</P>

<P>
<B>A &lt; B</B>
</P>

<P>
Both values must be numbers. The result is TRUE if the first number is less than the second, otherwise it is FALSE.
</P>

<P>
<B>- A</B>
</P>

<P>
The value must be a number. The result is 0 minus the original value.
</P>

<P>
<B>! A</B>
</P>

<P>
The value is treated as boolean. The result is FALSE if the value is TRUE, and TRUE if the value is FALSE.
</P>

<P>
<B>A ? B : C</B>
</P>

<P>
The first value is treated as boolean. The result is B if the value is TRUE and C if the value is FALSE.
</P>

<P>
<B>A ++</B>
</P>

<P>
Increases the value of A by 1. A must be a number; if not, the code has no effect. The return value is the old value of A.
</P>

<P>
<B>A --</B>
</P>

<P>
Decreases the value of A by 1. A must be a number; if not, the code has no effect. The return value is the old value of A.
</P>

<P>
<B>A += B</B>
</P>

<P>
Adds A to B and stores the result in A. <a href="Problems_with_compound_operators_in_SLUDGE.html">*</a>
</P>

<P>
<B>A -= B</B>
</P>

<P>
Takes B from A and stores the result in A. <a href="Problems_with_compound_operators_in_SLUDGE.html">*</a>
</P>

<P>
<B>A *= B</B>
</P>

<P>
Multiplies A and B and stores the result in A. <a href="Problems_with_compound_operators_in_SLUDGE.html">*</a>
</P>

<P>
<B>A /= B</B>
</P>

<P>
Divides A by B and stores the result in A. <a href="Problems_with_compound_operators_in_SLUDGE.html">*</a>
</P>

<P>
<B>A %= B</B>
</P>

<P>
Performs the operation A % B and stores the result in A. <a href="Problems_with_compound_operators_in_SLUDGE.html">*</a>
</P>

<P>
(For operations in which the value or values must be numbers, the engine will quit with a Fatal Error message box if non-numbers are used.)
</P>

<H3>More on this subject:</H3>

<P>
<a href="Problems_with_compound_operators_in_SLUDGE.html">Problems with +=, -=, *=, /= and %= in SLUDGE</a>
</P>

<H3>See also:</H3>

<P>
<a href="Treating_Variables_as_Booleans.html">Treating Variables as Booleans</a>
</P>

<P>
<a href="Treating_Variables_as_Strings.html">Treating Variables as Strings</a>
</P>

<P class="copyright-notice">SLUDGE and this SLUDGE documentation are <A HREF="Copyright.html">copyright</A> Hungry Software and contributors 2000-2012
</P>

<HR>
</BODY>
</html>