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

Integers

Integers

Integers are a feature.

A data type that represents some range of mathematical integers.


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

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 Perl:
# \d+(_\d+)*
Example from MySQL:
-- [0-9]+(?=[^0-9a-z$_\u0080-\uffff])
Example from Go:
i, j := 42, 2701
Example from Swift:
// [0-9][0-9_]*
Example from Haskell:
-- \d(_*\d)*
Example from Ada:
-- [0-9_]+
Example from Prolog:
% \d\d?\'[a-zA-Z0-9]+
Example from Clojure, Hy, Fennel:
; -?\d+
Example from Elixir:
# \d(_?\d)*
Example from Erlang:
% [+-]?(?:[2-9]|[12][0-9]|3[0-6])#[0-9a-zA-Z]+
Example from Reason:
// \d[\d_]*
Example from Bash:
PLDB=80766866
Example from awk, CoffeeScript:
# [0-9]+
Example from F#:
// \d[\d_]*[uU]?[yslLnQRZINGmM]?
Example from Verilog:
// ([0-9]+)|(\'d)[0-9]+
Example from Elm:
-- _?\d+
Example from D:
// (0|[1-9][0-9_]*)([LUu]|Lu|LU|uL|UL)?
Example from VHDL:
-- \d{1,2}#[0-9a-f_]+#?
Example from PostScript:
% (\-|\+)?[0-9]+(?=[()<>\[\]{}/%\s])
Example from Chapel, Zephir, QML, SuperCollider, Alloy, Koka, Whiley, POV-Ray SDL:
// [0-9]+
Example from Forth:
\ (\#|%|&|\-|\+)?[0-9]+
Example from Idris, Agda:
-- \d+
Example from Applescript:
-- [-+]?\d+
Example from VBScript, Monkey:
' [0-9]+
Example from AMPL:
# \d+([eE][+-]?\d+)?
Example from ABAP:
* [0-9]+
Example from Protocol Buffers:
// \d+[LlUu]*
Example from AutoIt, AutoHotkey:
; \d+
Example from GNU Octave:
% \d+
Example from TOML:
# \d{4}-\d{2}-\d{2}(?:T| )\d{2}:\d{2}:\d{2}(?:Z|[-+]\d{2}:\d{2})
Example from Icon, Unicon:
# \b([+-]?[0-9]+[KMGTPkmgtp]?)\b
Example from Scilab, Io, Modelica, Linden Scripting Language:
// \d+
Example from Boo:
# \d+
Example from J:
NB. _?\d+
Example from Ceylon:
// \d{1,3}(_\d{3})+[kMGTP]?
Example from SPARQL:
# [+\-]?\d+
Example from SystemVerilog:
// ([1-9][_0-9]*)?\s*\'[sS]?[dD]\s*[xXzZ?0-9][_xXzZ?0-9]*
Example from LiveScript:
# [0-9]+(~[0-9a-z]+)?(?:[a-zA-Z_]+)?
Example from Pig Latin:
-- [0-9]+L?
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
Example from K:
/ [0-9]+[ihtuv]
Example from Ragel:
# [+-]?[0-9]+
Example from Felix:
// (0|[1-9][0-9_]*)([tTsSiIlLvV]|ll|LL|([iIuU])(8|16|32|64))?
Example from MiniD:
// ([0-9][0-9_]*)(?![.eE])
Example from GDScript:
# \d+j?
Example from Golo:
# -?\d[\d_]*
infix-notation-feature.html 路 integers-feature.html 路 interface-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