You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Language/Functions/Bits and Bytes/bitSet.adoc
+18-4Lines changed: 18 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,13 +34,23 @@ Sets (writes a 1 to) a bit of a numeric variable.
34
34
35
35
[float]
36
36
=== Returns
37
-
x: the value of the numeric variable after the bit at position n is set.
37
+
`x`: the value of the numeric variable after the bit at position `n` is set.
38
+
39
+
--
40
+
// OVERVIEW SECTION ENDS
38
41
39
42
43
+
44
+
// HOW TO USE SECTION STARTS
45
+
[#howtouse]
46
+
--
47
+
40
48
[float]
41
49
=== Example Code
42
-
Prints the output of bitSet(x,n) on two given integers. The binary representation of 4 is 0100, so when n=1, the second bit from the right is set to 1. After this we are left with 0110 in binary, so 6 is returned.
50
+
Prints the output of `bitSet(x,n)` on two given integers. The binary representation of 4 is 0100, so when `n=1`, the second bit from the right is set to 1. After this we are left with 0110 in binary, so 6 is returned.
0 commit comments