Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

Commit 28ff208

Browse files
committed
chore: reset alignment
1 parent e0d32eb commit 28ff208

File tree

1 file changed

+39
-39
lines changed

1 file changed

+39
-39
lines changed

pages/book/operators.mdx

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ Can only be applied to values of type [`Int{:tact}`][int]:
163163

164164
```tact
165165
let two: Int = 2;
166-
two * two; // 4
167-
0 * 1_000_000_000; // 0
168-
-1 * 5; // -5
166+
two * two; // 4
167+
0 * 1_000_000_000; // 0
168+
-1 * 5; // -5
169169
170170
pow(2, 255) * pow(2, 255); // build error: integer overflow!
171171
```
@@ -178,12 +178,12 @@ Can only be applied to values of type [`Int{:tact}`][int]:
178178

179179
```tact
180180
let two: Int = 2;
181-
two / 2; // 1
182-
two / 1; // 0
183-
-1 / 5; // -1
184-
-1 / -5; // 0
185-
1 / -5; // -1
186-
1 / 5; // 0
181+
two / 2; // 1
182+
two / 1; // 0
183+
-1 / 5; // -1
184+
-1 / -5; // 0
185+
1 / -5; // -1
186+
1 / 5; // 0
187187
```
188188

189189
#### Modulo, `%` [#binary-modulo]
@@ -197,9 +197,9 @@ let two: Int = 2;
197197
two % 2; // 0
198198
two % 1; // 1
199199
200-
1 % 5; // 1
200+
1 % 5; // 1
201201
-1 % 5; // 4
202-
1 % -5; // -4
202+
1 % -5; // -4
203203
-1 % -5; // -1
204204
```
205205

@@ -230,7 +230,7 @@ Can only be applied to values of type [`Int{:tact}`][int]:
230230
```tact
231231
let two: Int = 2;
232232
two + 2; // 4
233-
-1 + 1; // 0
233+
-1 + 1; // 0
234234
235235
pow(2, 254) + pow(2, 254); // 2 * 2^254
236236
pow(2, 255) + pow(2, 255); // build error: integer overflow!
@@ -246,7 +246,7 @@ Can only be applied to values of type [`Int{:tact}`][int]:
246246
```tact
247247
let two: Int = 2;
248248
two - 2; // 0
249-
-1 - 1; // -2
249+
-1 - 1; // -2
250250
251251
pow(2, 254) - pow(2, 254); // 0
252252
pow(2, 255) - pow(2, 255); // 0
@@ -266,8 +266,8 @@ Can only be applied to values of type [`Int{:tact}`][int]:
266266
```tact
267267
let two: Int = 2;
268268
two >> 1; // 1
269-
4 >> 1; // 2
270-
5 >> 1; // 2, due to flooring of integer values
269+
4 >> 1; // 2
270+
5 >> 1; // 2, due to flooring of integer values
271271
272272
pow(2, 254) >> 254; // 1
273273
```
@@ -288,8 +288,8 @@ Can only be applied to values of type [`Int{:tact}`][int]:
288288
```tact
289289
let two: Int = 2;
290290
two << 1; // 4
291-
1 << 5; // 1 * 2^5, which is 32
292-
2 << 5; // 2 * 2^5, which is 64
291+
1 << 5; // 1 * 2^5, which is 32
292+
2 << 5; // 2 * 2^5, which is 64
293293
294294
pow(2, 254) == (1 << 254); // true
295295
pow(2, 254) == 1 << 254; // true, no parentheses needed due to higher precedence of >> over ==
@@ -313,8 +313,8 @@ Binary _greater than_ operator `>{:tact}` returns `true{:tact}` if the left oper
313313

314314
```tact
315315
let two: Int = 2;
316-
two > 2; // false
317-
-1 > -3; // true
316+
two > 2; // false
317+
-1 > -3; // true
318318
```
319319

320320
#### Greater than or equal to, `>=` [#binary-greater-equal]
@@ -323,8 +323,8 @@ Binary _greater than or equal to_ operator `>={:tact}` returns `true{:tact}` if
323323

324324
```tact
325325
let two: Int = 2;
326-
two >= 2; // true
327-
-1 >= -3; // true
326+
two >= 2; // true
327+
-1 >= -3; // true
328328
```
329329

330330
#### Less than, `<` [#binary-less]
@@ -333,8 +333,8 @@ Binary _less than_ operator `<{:tact}` returns `true{:tact}` if the left operand
333333

334334
```tact
335335
let two: Int = 2;
336-
two < 2; // false
337-
-1 < -3; // false
336+
two < 2; // false
337+
-1 < -3; // false
338338
```
339339

340340
#### Less than or equal to, `<=` [#binary-less-equal]
@@ -417,12 +417,12 @@ Can only be applied to values of type [`Int{:tact}`][int]:
417417

418418
```tact
419419
let two: Int = 2;
420-
two & 1; // 0
421-
4 & 1; // 0
422-
3 & 1; // 1
423-
1 & 1; // 1
420+
two & 1; // 0
421+
4 & 1; // 0
422+
3 & 1; // 1
423+
1 & 1; // 1
424424
425-
255 & 0b00001111; // 15
425+
255 & 0b00001111; // 15
426426
0b11110000 & 0b00001111; // 15
427427
```
428428

@@ -444,11 +444,11 @@ Can only be applied to values of type [`Int{:tact}`][int]:
444444
```tact
445445
let two: Int = 2;
446446
two ^ 3; // 1
447-
4 ^ 1; // 0
448-
3 ^ 1; // 3
449-
1 ^ 1; // 0
447+
4 ^ 1; // 0
448+
3 ^ 1; // 3
449+
1 ^ 1; // 0
450450
451-
255 ^ 0b00001111; // 240
451+
255 ^ 0b00001111; // 240
452452
0b11110000 ^ 0b00001111; // 240
453453
```
454454

@@ -468,11 +468,11 @@ Can only be applied to values of type [`Int{:tact}`][int]:
468468
```tact
469469
let two: Int = 2;
470470
two | 1; // 3
471-
4 | 1; // 5
472-
3 | 1; // 3
473-
1 | 1; // 1
471+
4 | 1; // 5
472+
3 | 1; // 3
473+
1 | 1; // 1
474474
475-
255 | 0b00001111; // 255
475+
255 | 0b00001111; // 255
476476
0b11110000 | 0b00001111; // 255
477477
```
478478

@@ -491,9 +491,9 @@ Can only be applied to values of type [`Bool{:tact}`][bool]:
491491

492492
```tact
493493
let iLikeTact: Bool = true;
494-
iLikeTact && true; // true, evaluated both operands
495-
iLikeTact && false; // false, evaluated both operands
496-
false && iLikeTact; // false, didn't evaluate iLikeTact
494+
iLikeTact && true; // true, evaluated both operands
495+
iLikeTact && false; // false, evaluated both operands
496+
false && iLikeTact; // false, didn't evaluate iLikeTact
497497
```
498498

499499
### Logical OR, `||` [#binary-logical-or]

0 commit comments

Comments
 (0)