Anonymous user
Literals/Integer: Difference between revisions
m
update integer literal examples
(add example) |
m (update integer literal examples) |
||
Line 1,674:
// i16 I16 (INT16_T) u16 U16 (UINT16_T)
// i8 I8 (INT8_T) u8 U8 (UINT8_T)
// u1 U1 (BOOL_T) u0 U0 (UNIT_T)
// iV iv Iv IV (INTV_T)
// Binary Octal Decimal Hexadecimal
// ------------ ---------- ------------ --------------
@SAY 0b1101
@SAY 0B0101
@SAY 0b1101I64
@SAY 0b1101I
@SAY 0b1001U64
@SAY 0b10010100U
@SAY 0B0101i32
@SAY 0B0101u32
@SAY 0B0101i16
@SAY 0B0101u16
@SAY 0B0101i8
@SAY 0B0101u8
@SAY 0b0u1 0o0u1
@SAY 0B001u1
@SAY 0b0u0 0o000u0
@SAY -1234iV ; // INTV_T (cpp_int)
@SAY 56781234Iv ; // INTV_T (cpp_int)
// note: _ (underscores) can appear in the main numeric part of the literal,
Line 1,699 ⟶ 1,701:
// no prefix, the numeric literal cannot begin with underscore:
@SAY 100_000 1_u1 0x_FFFF_u16 1__0__ 0x__7890_ABCD_EFAB_CDEF__u64; </lang>
=={{header|XPL0}}==
|