Literals/Integer: Difference between revisions

Content deleted Content added
Line 425:
3TB # 3298534883328</lang>
=={{header|PureBasic}}==
PureBasic allows integer literals to be specified in base 2, base 10, or base 16. Base 2 numbers start with '%', and base 16 numbers start with '$'.
<lang PureBasic>x = 15 ;15 in base 10
x = %1111 ;15 in base 2
x = $f ;15 in base 16</lang>
An integer representing a character code can also be expressed by surrounding the character with single quotes.
 
<lang PureBasic>x = 'a' ;129</lang>
 
=={{header|Python}}==