encyclopegia.org

Ordinal data type

In computer programming, an ordinal data type is a data type with the property that its values can be counted.[src] That is, the values can be put in a one-to-one correspondence with the positive integers.[src] For example, characters are ordinal because we can call 'A' the first character, 'B' the second, etc.[src] The term is often used in programming for variables that can take one of a finite (often small) number of values.[src] While the values are often implemented as integers (or similar types such as bytes) they are assigned literal names and the programming language (and the compiler for that language) can enforce that variables only be assigned those literals.[src] For instance in Pascal, one can define: var x: 1..10; y: 'a'..'z';[src]

In computer programming, an ordinal data type is a data type with the property that its values can be counted.[src] That is, the values can be put in a one-to-one correspondence with the positive integers.[src] For example, characters are ordinal because we can call 'A' the first character, 'B' the second, etc.[src] The term is often used in programming for variables that can take one of a finite (often small) number of values.[src] While the values are often implemented as integers (or similar types such as bytes) they are assigned literal names and the programming language (and the compiler for that language) can enforce that variables only be assigned those literals.[src] For instance in Pascal, one can define: var x: 1..10; y: 'a'..'z'; ==References==[src]

12 sentences · 12 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Ordinal data type." encyclopegia.org, 2025, https://encyclopegia.org/wiki/ordinal-data-type. Accessed 30 November 2026.

Chicago

"Ordinal data type." encyclopegia.org. Accessed November 30, 2026. https://encyclopegia.org/wiki/ordinal-data-type.

APA

encyclopegia.org. (2025). Ordinal data type. Retrieved November 30, 2026, from https://encyclopegia.org/wiki/ordinal-data-type

Accessed November 30, 2026 · CC BY-SA 4.0 · citation page · JSON

CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1311838383 · 0.5 · snapshot enwiki-001311838383

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners
  • Index — every corpus, paper and record
  • Estate guide — what a public data estate is
  • Founder — Lois-Kleinner Alpasan
  • Records — DOIs and external deposits
  • Documents — one-pagers, PDFs and QR codes
  • Brand kit — logos and share images
  • Papers — plain-language briefs with citations
  • Browser — search engine, PWA and bookmarklet
  • Anticloud — the operator and its projects

As seen in Business Insider · 336 outlets · evidence DOIs · plain-language papers

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.