Measures Concepts
GitHub icon

Octals

Octals - language feature

< >
Example from Java, AspectJ, Pizza, Oracle Java, Deesel:
// 0[0-7_]+[lL]?
Example from JavaScript, TypeScript:
// 0[oO]?[0-7]+n? 0o464063622
Example from Python:
# 0[oO](?:_?[0-7])+
Example from Perl:
# 0_?[0-7]+(_[0-7]+)*
Example from Go:
// 0[0-7]+
Example from Swift:
// 0o[0-7_]+
Example from Haskell:
-- 0[oO]_*[0-7](_*[0-7])*
Example from Julia:
# 0o[0-7]+((_[0-7]+)+)?
Example from Prolog, CLPR, GAEA, Progol:
% 0o[0-7]+
Example from Elixir:
# 0o[0-7]+
Example from Verilog:
// ([0-9]+)|(\'o)[0-7]+
Example from Reason:
// 0[oO][0-7][0-7_]*
Example from F#:
// 0[oO][0-7][0-7_]*[uU]?[yslLn]?
Example from Eiffel:
-- 0[cC][0-7]+
Example from D:
// 0[0-7_]+
Example from VHDL:
-- O"[0-7_]+"
Example from PostScript:
% [0-9]+\#(\-|\+)?([0-9]+\.?|[0-9]*\.[0-9]+|[0-9]+\.[0-9]*)((e|E)[0-9]+)?(?=[()<>\[\]{}/%\s])
Example from Chapel:
// 0[oO][0-7]+
Example from Protocol Buffers:
// 0[0-7]+[LlUu]*
Example from AutoIt, AutoHotkey:
; 0\d+
Example from Hy:
; 0[0-7]+j?
Example from Boo:
# 0\d+
Example from SystemVerilog:
// ([1-9][_0-9]*)?\s*\'[sS]?[oO]\s*[xXzZ?0-7][_xXzZ?0-7]*
Example from C3:
0o177
Example from Golo:
# 0[0-7]+j?
Example from Felix:
// 0[0-7_]+([tTsSiIlLvV]|ll|LL|([iIuU])(8|16|32|64))?
Example from Jule:
0455

Languages with Octals include Java, JavaScript, Python, Perl, Go, Swift, Haskell, TypeScript, Julia, Prolog, Elixir, Verilog, Reason, F#, Eiffel, OCaml, D, VHDL, PostScript, Chapel, Protocol Buffers, Coq, Zig, AutoIt, Hy, Opa, IDL, Boo, F*, SystemVerilog, Cython, Isabelle, C3, Puppet, AutoHotkey, AspectJ, Golo, SourcePawn, HLSL, GLSL, Felix, Jule, Pizza, Cryptol, ooc, Meson, Aardvark, Logtalk, Earl Grey, Pawn, FloScript, CLPR, nimrod, CBOR data definition language, Oracle Java, Deesel, GAEA, Progol

Languages without Octals include Speedie, progsbase

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

Read more about Octals 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