PLDB
Languages Features Calendar CSV Lists Blog About Sponsor Add Language
GitHub icon

Hexadecimals

Hexadecimals

Hexadecimals are a feature.

Base-16 number system that uses the digits 0-9+A-F. Often represented by putting a "0x" before the number. So 15 === 0xF and 256 === 0X100.


Languages with Hexadecimals include Java, JavaScript, Python, Perl, MySQL, Go, Swift, Haskell, Ada, Prolog, Clojure, Elixir, Julia, Dart, Reason, ActionScript, awk, F#, Verilog, Eiffel, OCaml, CoffeeScript, D, VHDL, PostScript, Chapel, WebAssembly, Forth, Idris, VBScript, Protocol Buffers, BlitzBasic, Agda, Coq, Monkey, AutoIt, Zephir, Hy, Zig, Icon, QML, IDL, Boo, F*, Ceylon, SuperCollider, SystemVerilog, Opa, Cython, Isabelle, ClojureScript, Puppet, AutoHotkey, Ioke, S, Pig Latin, AspectJ, Thrift, Transact-SQL, SourcePawn, K, HLSL, Koka, Xtend, Ragel, Unicon, Pony, Felix, GLSL, Jule, Futhark, chaiscript, MiniD, BlitzMax, Cryptol, ooc, clay, Nit, Whiley, Vim script, Linden Scripting Language, GDScript, Meson, OpenEdge ABL, Golo, Logtalk, monte, Pawn, Earl Grey, parasail, TAL, FloScript, Urbiscript, nimrod, Savi, CBOR data definition language, Flatline, Kal, SARL, Croc, RAISE Specification Language

Example from Java, AspectJ:
// 0[xX][0-9a-fA-F][0-9a-fA-F_]*[lL]?
Example from JavaScript:
// 0[xX][0-9a-fA-F]+n? 0x4D06792
Example from Python:
# 0[xX](?:_?[a-fA-F0-9])+
Example from Perl:
# 0x[0-9A-Fa-f]+(_[0-9A-Fa-f]+)*
Example from MySQL:
-- x'([0-9a-f]{2})+'
Example from Go, Dart, Chapel, Koka, Linden Scripting Language:
// 0[xX][0-9a-fA-F]+
Example from Swift:
// 0x[0-9a-fA-F_]+
Example from Haskell:
-- 0[xX]_*[\da-fA-F](_*[\da-fA-F])*
Example from Ada:
-- [0-9_]+#[0-9a-f_\.]+#
Example from Prolog:
% 0x[0-9a-fA-F]+
Example from Clojure:
; 0x-?[abcdef\d]+
Example from Elixir:
# 0x[\da-fA-F]+
Example from Julia:
# 0x[a-fA-F0-9]+((_[a-fA-F0-9]+)+)?
Example from Reason:
// 0[xX][\da-fA-F][\da-fA-F_]*
Example from awk, CoffeeScript:
# 0x[0-9a-fA-F]+
Example from F#:
// 0[xX][\da-fA-F][\da-fA-F_]*[uU]?[yslLn]?[fF]?
Example from Verilog:
// ([0-9]+)|(\'h)[0-9a-fA-F]+
Example from Eiffel:
-- 0[xX][a-fA-F0-9]+
Example from D:
// 0[xX][0-9a-fA-F_]+
Example from VHDL:
-- X"[0-9a-f_]+"
Example from PostScript:
% <[0-9A-Fa-f]+>(?=[()<>\[\]{}/%\s])
Example from Forth:
\ (\$[0-9A-F]+)
Example from Idris, Agda:
-- 0[xX][\da-fA-F]+
Example from VBScript:
' &h[0-9a-f]+
Example from Protocol Buffers:
// 0x[0-9a-fA-F]+[LlUu]*
Example from Monkey:
' \$[0-9a-fA-Z]+
Example from AutoIt, Hy, AutoHotkey:
; 0[xX][a-fA-F0-9]+
Example from Zephir, QML, SuperCollider, Whiley:
// 0x[0-9a-fA-F]+
Example from Icon, Unicon:
# \b([+-]?([2-9]|[12][0-9]|3[0-6])[rR][0-9a-zA-Z]+)\b
Example from Boo:
# 0x[a-fA-F0-9]+
Example from Ceylon:
// #([0-9a-fA-F]{4})(_[0-9a-fA-F]{4})+
Example from SystemVerilog:
// ([1-9][_0-9]*)?\s*\'[sS]?[hH]\s*[xXzZ?0-9a-fA-F][_xXzZ?0-9a-fA-F]*
Example from Pig Latin, Transact-SQL:
-- 0x[0-9a-f]+
Example from K:
/ [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
Example from Ragel:
# 0x[0-9A-Fa-f]+
Example from Felix:
// 0[xX][0-9a-fA-F_]+([tTsSiIlLvV]|ll|LL|([iIuU])(8|16|32|64))?
Example from Jule:
0xDFF90
Example from MiniD:
// 0[xX][0-9a-fA-F][0-9a-fA-F_]*
Example from GDScript, Golo:
# 0[xX][a-fA-F0-9]+
function-overloading-feature.html 路 hexadecimals-feature.html 路 octals-feature.html

View source

PLDB - Build the next great programming language 路 v2022 Day 33 Docs Build Acknowledgements Traffic Today Traffic Trends Mirrors GitHub feedback@pldb.com