What can I do?

buscador
Discover
Carrito Total 0 0

226539 materialEducativo

textoFiltroFicha
  • I like 0
  • Visits 0
  • Comments 0
  • Save to
  • Actions

About this resource...

Constant (computer programming)
In computer programming, a constant is a value that cannot be altered by the program during normal execution, i.e., the value is constant. When associated with an identifier, a constant is said to be "named," although the terms "constant" and "named constant" are often used interchangeably. This is contrasted with a variable, which is an identifier with a value that can be changed during normal execution, i.e., the value is variable. Constants are useful for both programmers and compilers: For programmers they are a form of self-documenting code and allow reasoning about correctness, while for compilers they allow compile-time andrun-time checks that verify that constancy assumptions are not violated, and allow or simplify some compiler optimizations. There are various specific realizations of the general notion of a constant, with subtle distinctions that are often overlooked. The most significant are: compile-time (statically-valued) constants, run-time (dynamically-valued) constants, immutable objects, and constant types (const). Typical examples of compile-time constants include mathematical constants, values from standards (here maximum transmission unit), or internal configuration values (here characters per line), such as these C examples: const float PI = 3.1415927; // maximal single float precisionconst unsigned int MTU = 1500; // Ethernet v2, RFC 894const unsigned int COLUMNS = 80; Typical examples of run-time constants are values calculated based on inputs to a function, such as this C++ example: void f(std::string s) { const size_t l = s.length(); // ...}

Conceptual map: Constante (informática)

Exclusive content for members of

D/i/d/a/c/t/a/l/i/a
Sign in

Mira un ejemplo de lo que te pierdes

Categories:

Tags:

Fecha publicación: 2.8.2018

Comment

0

Do you want to comment? Sign up or Sign in

Join Didactalia

Browse among 226539 resources and 574237 people

Regístrate >

O conéctate a través de:

Si ya eres usuario, Inicia sesión

Do you want to access more educational content?

Sign in Join a class
x

Add to Didactalia Arrastra el botón a la barra de marcadores del navegador y comparte tus contenidos preferidos. Más info...

Game help
Juegos de anatomía
Selecciona nivel educativo