Measures Concepts
GitHub icon

Hexadecimals

Hexadecimals - language feature

< >
Example from Java, AspectJ, Pizza, Oracle Java, Deesel:
// 0[xX][0-9a-fA-F][0-9a-fA-F_]*[lL]?
Example from JavaScript, TypeScript:
// 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})+'
// 0[xX][0-9a-fA-F]+
Example from Swift:
// 0x[0-9a-fA-F_]+
Example from Ada:
-- [0-9_]+#[0-9a-f_\.]+#
Example from Haskell:
-- 0[xX]_*[\da-fA-F](_*[\da-fA-F])*
Example from Julia:
# 0x[a-fA-F0-9]+((_[a-fA-F0-9]+)+)?
Example from Clojure:
; 0x-?[abcdef\d]+
Example from Prolog, CLPR, GAEA, Progol:
% 0x[0-9a-fA-F]+
Example from Elixir:
# 0x[\da-fA-F]+
Example from Verilog:
// ([0-9]+)|(\'h)[0-9a-fA-F]+
Example from Reason:
// 0[xX][\da-fA-F][\da-fA-F_]*
Example from awk, CoffeeScript, bawk:
# 0x[0-9a-fA-F]+
Example from F#:
// 0[xX][\da-fA-F][\da-fA-F_]*[uU]?[yslLn]?[fF]?
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 VBScript:
' &h[0-9a-f]+
Example from Idris, Agda:
-- 0[xX][\da-fA-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 Ceylon:
// #([0-9a-fA-F]{4})(_[0-9a-fA-F]{4})+
Example from Boo:
# 0x[a-fA-F0-9]+
Example from SystemVerilog:
// ([1-9][_0-9]*)?\s*\'[sS]?[hH]\s*[xXzZ?0-9a-fA-F][_xXzZ?0-9a-fA-F]*
Example from MiniD, Croc:
// 0[xX][0-9a-fA-F][0-9a-fA-F_]*
Example from Speedie:
|| num = 0xBEEF
Example from Pig Latin, Transact-SQL:
-- 0x[0-9a-f]+
Example from Golo, GDScript:
# 0[xX][a-fA-F0-9]+
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 Aardvark:
`16_fa7` would evaluate as a hexadecimal number

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

Languages without Hexadecimals include progsbase

This question asks: Does the language have a syntax for hexadecimals?

Read more about Hexadecimals on the web: 1.

HTML of this page generated by Features.ts

View source

- Build the next great programming language Search Add Language Features Creators Resources About Blog Acknowledgements Queries Stats Sponsor Day 605 feedback@pldb.io Logout