Hexadecimal literal

Hexadecimal integer constant, also known as base 16 constant. it is from combination of following hexadecimal digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a/A, b/B, c/C, d/D, e/E, f/F

hexadecimal literal

Description

 0xA12F

Output

Compatible programing languages:
C | Visual C++ .NET | C++ | C# | Java | JavaScript | PHP

Examples

Example

Hexadecimal literal the possible of use:
x = 0x1234;       // x = 4660
y = 4 * 0xff;     // y = 1020
if (x>0xabc)
  y = x / 0xa;    // y = 466

Example

Other pieces of example codes:
i / 0xab
0x01 | 0x02
0x12AB << j
0xA >> 2
0xabcd & k
0xff | k

hexadecimal literal

Description

 $A12F

Output

Compatible programing languages:
Pascal | Object Pascal | Free Pascal

Examples

Object Pascal

Hexadecimal literal the possible of use:
x := $1234;       // x = 4660
y := 4 * $ff;     // y = 1020
if x>$abc then
  y := x / $a;    // y = 466

Object Pascal

Other pieces of example codes:
$ff or k
$1A xor $1A
$AC xor k
$ff >= y
$f and $ff
$A shr 2

hexadecimal literal

Description

 &HA12F

Output

Compatible programing languages:
Basic | FreeBASIC | Visual Basic .NET

Examples

Basic

Hexadecimal literal the possible of use:
x = &H1234       ' x = 4660
y = 4 * &Hff     ' y = 1020
if x>&Habc then
  y = x / &Ha    ' y = 466
end if

Basic

Other pieces of example codes:
&Hff mod 50
&Habcd and k
&Hff >= y
not&Habcd
&HAF
i * &HFF

You can find it in the following collections: constants
Languages: en hu cz sk