Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a21ba54798035a3a

Jump to content

Ordinal data type

From Wikipedia, the free encyclopedia
(Redirected from Ordinal data (programming))

In computer programming, an ordinal data type is a data type with the property that its values can be counted. That is, the values can be put in a one-to-one correspondence with the positive integers.[1] For example, characters are ordinal because we can call 'A' the first character, 'B' the second, etc. The term is often used in programming for variables that can take one of a finite (often small) number of values. 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.

For instance in Pascal, one can define:

var
  x: 1..10;
  y: 'a'..'z';

References

[edit]
  1. Jensen, Kathleen (1991). Pascal User Manual and Report: ISO Pascal Standard. A. B. Mickel, J. F. Miner, Niklaus Wirth (4th ed.). New York, NY: Springer New York. ISBN 978-1-4612-4450-9.