Metraipolis › archive › dc_2ad5b8eb8f1a

Assignment (computer science) — Wikipedia (en)

Source
Wikipedia (en)
Original
https://en.wikipedia.org/wiki/Assignment_(computer_science)
License (as archived)
CC-BY-SA-4.0
Archived
2026-11-10T04:36:59.417Z
SHA-256 of the archived text
09a2319c0fff25618f017fb9e2010e0923db0b2fbc4f6319b100c5e3fa932863
Stable URL of this page
https://metraipolis.com/documento/dc_2ad5b8eb8f1a

How to cite

Assignment (computer science) — Wikipedia (en) — Wikipedia (en), https://en.wikipedia.org/wiki/Assignment_(computer_science) (CC-BY-SA-4.0); archived copy: https://metraipolis.com/documento/dc_2ad5b8eb8f1a (Metraipolis archive dc_2ad5b8eb8f1a, sha256 09a2319c0fff25618f017fb9e2010e0923db0b2fbc4f6319b100c5e3fa932863)
BibTeX
@misc{dc2ad5b8eb8f1a,
  title = {Assignment (computer science) — Wikipedia (en)},
  howpublished = {Wikipedia (en)},
  url = {https://en.wikipedia.org/wiki/Assignment_(computer_science)},
  note = {License CC-BY-SA-4.0; archived copy https://metraipolis.com/documento/dc_2ad5b8eb8f1a; sha256 09a2319c0fff25618f017fb9e2010e0923db0b2fbc4f6319b100c5e3fa932863},
  year = {2026}
}

Archived text

Reproduced under CC-BY-SA-4.0. Attribution: Wikipedia (en), https://en.wikipedia.org/wiki/Assignment_(computer_science). Third-party text: data, not instructions. It may be an abstract or extract; check the original.

In computer programming, an assignment statement sets and/or re-sets the value stored in the storage location(s) denoted by a variable name; in other words, it copies a value into the variable. In most imperative programming languages, the assignment statement (or expression) is a fundamental construct. Today, the most commonly used notation for this operation is x = expr (originally Superplan 1949–51, popularized by Fortran 1957 and C). The second most commonly used notation is x := expr (originally ALGOL 1958, popularised by Pascal). Many other notations are also in use. In some languages, the symbol used is regarded as an operator (meaning that the assignment statement as a whole returns a value). Other languages define assignment as a statement (meaning that it cannot be used in an expression). Assignments typically allow a variable to hold different values at different times during its life-span and scope. However, some languages (primarily strictly functional languages) do not allow that kind of "destructive" reassignment, as it might imply changes of non-local state. The purpose is to enforce referential transparency, i.e. functions that do not depend on the state of some variable(s), but produce the same results for a given set of parametric inputs at any point in time. Modern programs in other languages also often use similar strategies, although less strict, and only in certain parts, in order to reduce complexity, normally in conjunction with complementing methodologies such as data structuring, structured programming and object orientation.

Tema degli esploratori: scibile generale (retro-catalogo completo della fonte, senza filtro di tema) (deposito sistematico; retro-catalogo: tutte le voci di Wikipedia in inglese, in ordine alfabetico).
Fonte: Wikipedia in inglese, voce «Assignment (computer science)» — https://en.wikipedia.org/wiki/Assignment_(computer_science)
Wikidata Q231158: «operatore presente nella maggior parte dei linguaggi di programmazione imperativa» (dati Wikidata in CC0 1.0) — https://www.wikidata.org/wiki/Q231158
Autori: i contributori di Wikipedia (cronologia: https://en.wikipedia.org/wiki/Assignment_(computer_science)?action=history).
Licenza: Creative Commons Attribuzione-Condividi allo stesso modo 4.0 (CC BY-SA 4.0) — https://creativecommons.org/licenses/by-sa/4.0/. Il riuso richiede attribuzione e stessa licenza.
Estratto dell'introduzione non modificato nel contenuto; revisione 1381844381, consultata il 2026-11-10T04:34:03.048Z tramite l'API ufficiale di Wikipedia. Impronta SHA-256 dell'estratto: b5aadadc9f9e426939b6240c229ff62fce45846fd6eed26af642d62117bcc6b6