#elisp
The syntax for integers in bases other than 10 uses ‘ # ’
followed by a letter that specifies the radix: ‘ b ’ for binary,
‘ o ’ for octal, ‘ x ’ for hex, or ‘ radix r ’ to
specify radix radix . Case is not significant for the letter
that specifies the radix. Thus, ‘ #b integer ’ reads integer in binary, and ‘ # radix r integer ’ reads integer in radix radix . Allowed values of radix run
from 2 to 36. For example:
#b101100 ⇒ 44
#o54 ⇒ 44
#x2c ⇒ 44
#24r1k ⇒ 44
If you want to change selection, open document below and click on "Move attachment"
GNU Emacs Lisp Reference Manual: Integer Basics ; The integer 1.
+1 ; Also the integer 1.
-1 ; The integer -1.
9000000000000000000
; The floating-point number 9e18.
0 ; The integer 0.
-0 ; The integer 0.
<span>The syntax for integers in bases other than 10 uses ‘ # ’
followed by a letter that specifies the radix: ‘ b ’ for binary,
‘ o ’ for octal, ‘ x ’ for hex, or ‘ radix r ’ to
specify radix radix . Case is not significant for the letter
that specifies the radix. Thus, ‘ #b integer ’ reads
integer in binary, and ‘ # radix r integer ’ reads
integer in radix radix . Allowed values of radix run
from 2 to 36. For example:
#b101100 ⇒ 44
#o54 ⇒ 44
#x2c ⇒ 44
#24r1k ⇒ 44
To understand how various functions work on integers, especially the
bitwise operators (see Bitwise Operations), it is often helpful to
view the numbers in their binary form.
In 30-bi Summary
status | not read | | reprioritisations | |
---|
last reprioritisation on | | | suggested re-reading day | |
---|
started reading on | | | finished reading on | |
---|
Details