Literals/Integer: Difference between revisions

(ruby + perl)
Line 33:
 
=={{header|Python}}==
{{works with|Python|2.5}}
<lang python>>>> # Bin(leading 0b), Oct(leading 0), Dec, Hex(leading 0x or 0X), in order:
<lang python>>>> # Oct(leading 0), Dec, Hex(leading 0x or 0X), in order:
>>> 0b1011010111 == 01327 == 727 == 0x2d7
>>> 01327 == 727 == 0x2d7
True
>>>
</lang>
{{works with|Python|3.0}}
<lang python>>>> # Bin(leading 0b or 0B), Oct(leading 00o or 0O), Dec, Hex(leading 0x or 0X), in order:
>>> 0b1011010111 == 013270o1327 == 727 == 0x2d7
True
>>>
</lang>
 
 
=={{header|Ruby}}==
Anonymous user