PLDB
Languages Features Calendar About Lists Add Language
GitHub icon

Integers

Integers

Integers are a language feature.

A data type that represents some range of mathematical integers.

Languages with Integers include Java, JavaScript, C, Python, C++, SQL, Ruby, Go, Perl, C#, Swift, MySQL, JSON, Haskell, Clojure, Erlang, Mathematica, Prolog, Julia, Elixir, Ada, OCaml, F#, CoffeeScript, Bash, D, Chapel, Forth, Elm, Verilog, awk, Eiffel, Reason, PostScript, GNU Octave, GraphQL, VHDL, Zig, Idris, Applescript, WebAssembly, Io, VBScript, Hy, ClojureScript, J, ActionScript, Boo, IDL, Protocol Buffers, TOML, XQuery, AMPL, AutoIt, Icon, Scilab, SuperCollider, Agda, Opa, sed, QBasic, SPARQL, Ceylon, Ioke, F*, ABAP, Maxima, Zephir, Koka, Coq, Lean, K, Turtle, Monkey, Modelica, SystemVerilog, AutoHotkey, Cython, Pig Latin, LiveScript, Puppet, Transact-SQL, Thrift, Pony, Fennel, Gosu, Unicon, AspectJ, Futhark, HOPE, QML, Alloy, EDN, Nit, PL/pgSQL, Felix, GLSL, Cryptol, Fancy, Xtend, BlitzBasic, Stan, Whiley, Meson, Ragel, Golo, HLSL, BlitzMax, OpenEdge ABL, MiniD, clay, SourcePawn, chaiscript, Linden Scripting Language, GDScript, Shen, Ion, monte, POV-Ray SDL, Redcode, parasail, JSLT, Earl Grey, Pawn, Boogie, nimrod, PromQL, FloScript, Flatline, Urbiscript, AmbientTalk, boa, Kal, CBOR data definition language, Easytrieve, Procfile, SARL, Spice, RAISE Specification Language, juttle, Friendly Enough Expression Language, Croc, RQL

Example from JavaScript, JSON, Julia:

80766866

Example from Java, AspectJ:

// 0|[1-9][0-9_]*[lL]?

Example from C, C#:

int pldb = 80766866;

Example from Python, Ruby:

pldb = 80766866

Example from C++:

int i = 0;

Example from SQL, Eiffel, Transact-SQL:

-- [0-9]+

Example from Go:

i, j := 42, 2701

Example from Perl:

# \d+(_\d+)*

Example from Swift:

// [0-9][0-9_]*

Example from MySQL:

-- [0-9]+(?=[^0-9a-z$_\u0080-\uffff])

Example from Haskell:

-- \d(_*\d)*

Example from Clojure, Hy, Fennel:

; -?\d+

Example from Erlang:

% [+-]?(?:[2-9]|[12][0-9]|3[0-6])#[0-9a-zA-Z]+

Example from Prolog:

% \d\d?\'[a-zA-Z0-9]+

Example from Elixir:

# \d(_?\d)*

Example from Ada:

-- [0-9_]+

Example from F#:

// \d[\d_]*[uU]?[yslLnQRZINGmM]?

Example from CoffeeScript, awk:

# [0-9]+

Example from Bash:

PLDB=80766866

Example from D:

// (0|[1-9][0-9_]*)([LUu]|Lu|LU|uL|UL)?

Example from Chapel, SuperCollider, Zephir, Koka, QML, Alloy, Whiley, POV-Ray SDL:

// [0-9]+

Example from Forth:

\ (\#|%|&|\-|\+)?[0-9]+

Example from Elm:

-- _?\d+

Example from Verilog:

// ([0-9]+)|(\'d)[0-9]+

Example from Reason:

// \d[\d_]*

Example from PostScript:

% (\-|\+)?[0-9]+(?=[()<>\[\]{}/%\s])

Example from GNU Octave:

% \d+

Example from VHDL:

-- \d{1,2}#[0-9a-f_]+#?

Example from Idris, Agda:

-- \d+

Example from Applescript:

-- [-+]?\d+

Example from Io, Scilab, Modelica, Linden Scripting Language:

// \d+

Example from VBScript, Monkey:

' [0-9]+

Example from J:

NB. _?\d+

Example from Boo:

# \d+

Example from Protocol Buffers:

// \d+[LlUu]*

Example from TOML:

# \d{4}-\d{2}-\d{2}(?:T| )\d{2}:\d{2}:\d{2}(?:Z|[-+]\d{2}:\d{2})

Example from AMPL:

# \d+([eE][+-]?\d+)?

Example from AutoIt, AutoHotkey:

; \d+

Example from Icon, Unicon:

# \b([+-]?[0-9]+[KMGTPkmgtp]?)\b

Example from SPARQL:

# [+\-]?\d+

Example from Ceylon:

// \d{1,3}(_\d{3})+[kMGTP]?

Example from ABAP:

* [0-9]+

Example from K:

/ [0-9]+[ihtuv]

Example from SystemVerilog:

// ([1-9][_0-9]*)?\s*\'[sS]?[dD]\s*[xXzZ?0-9][_xXzZ?0-9]*

Example from Pig Latin:

-- [0-9]+L?

Example from LiveScript:

# [0-9]+(~[0-9a-z]+)?(?:[a-zA-Z_]+)?

Example from Felix:

// (0|[1-9][0-9_]*)([tTsSiIlLvV]|ll|LL|([iIuU])(8|16|32|64))?

Example from Ragel:

# [+-]?[0-9]+

Example from Golo:

# -?\d[\d_]*

Example from MiniD:

// ([0-9][0-9_]*)(?![.eE])

Example from GDScript:

# \d+j?

Example from Ion:

// http://amzn.github.io/ion-docs/docs/spec.html null.int // A null int value 0 // Zero. Surprise! -0 // ...the same value with a minus sign 123 // A normal int -123 // Another negative int 0xBeef // An int denoted in hexadecimal 0b0101 // An int denoted in binary 1_2_3 // An int with underscores 0xFA_CE // An int denoted in hexadecimal with underscores 0b10_10_10 // An int denoted in binary with underscores

Article source

PLDB - Build the next great programming language 路 v2022 Docs Acknowledgements Email GitHub