Metraipolis › archive › dc_76ac0e4d8457

Augmented assignment — Wikipedia (en)

Source
Wikipedia (en)
Original
https://en.wikipedia.org/wiki/Augmented_assignment
License (as archived)
CC-BY-SA-4.0
Archived
2026-11-10T08:53:07.603Z
SHA-256 of the archived text
245cad7cc8a792d1741915aae784ca576762e5f22ca075b388612a0b78726f54
Stable URL of this page
https://metraipolis.com/documento/dc_76ac0e4d8457

How to cite

Augmented assignment — Wikipedia (en) — Wikipedia (en), https://en.wikipedia.org/wiki/Augmented_assignment (CC-BY-SA-4.0); archived copy: https://metraipolis.com/documento/dc_76ac0e4d8457 (Metraipolis archive dc_76ac0e4d8457, sha256 245cad7cc8a792d1741915aae784ca576762e5f22ca075b388612a0b78726f54)
BibTeX
@misc{dc76ac0e4d8457,
  title = {Augmented assignment — Wikipedia (en)},
  howpublished = {Wikipedia (en)},
  url = {https://en.wikipedia.org/wiki/Augmented_assignment},
  note = {License CC-BY-SA-4.0; archived copy https://metraipolis.com/documento/dc_76ac0e4d8457; sha256 245cad7cc8a792d1741915aae784ca576762e5f22ca075b388612a0b78726f54},
  year = {2026}
}

Archived text

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

Augmented assignment (or compound assignment) is the name given to certain assignment operators in certain programming languages (especially those derived from C). An augmented assignment is generally used to replace a statement where an operator takes a variable as one of its arguments and then assigns the result back to the same variable. A simple example is x += 1 which is expanded to x = x + 1. Similar constructions are often available for various binary operators. In general, in languages offering this feature, most operators that can take a variable as one of their arguments and return a result of the same type have an augmented assignment equivalent that assigns the result back to the variable in place, including arithmetic operators, bitshift operators, and bitwise operators.

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 «Augmented assignment» — https://en.wikipedia.org/wiki/Augmented_assignment
Wikidata Q4820439: «a type of assignment operator where an operator takes a variable as one of its arguments and then assigns the result back to the same variable» (dati Wikidata in CC0 1.0) — https://www.wikidata.org/wiki/Q4820439
Autori: i contributori di Wikipedia (cronologia: https://en.wikipedia.org/wiki/Augmented_assignment?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 1384183451, consultata il 2026-11-10T08:48:55.925Z tramite l'API ufficiale di Wikipedia. Impronta SHA-256 dell'estratto: eeb8b0fdb7af734afc61b73b70bec1cbeb13759abed05b6f4e5dcedb48b2e808