self-modifying variable

noun
UK /ˌsɛlf ˈmɒdɪfaɪɪŋ ˈveəriəbl/
US /ˌsɛlf ˈmɑːdɪfaɪɪŋ ˈveriəbl/

A self-modifying variable is a value in a computer program that can change itself while the program is running.

The game uses a self-modifying variable to keep track of the player's score as it goes up.


OTHER MEANINGS

2. A variable whose stored value is rewritten by the program's own instructions during execution.

In the simulation, the self-modifying variable adjusted the speed each time the loop repeated.

3. A placeholder in a script that updates itself automatically based on new input.

The weather app relies on a self-modifying variable to show the latest temperature.

4. A data slot that changes without someone typing a new value by hand.

Instead of editing the number manually, the self-modifying variable counted each click on its own.