lexical variable

noun
UK /ˈlɛksɪkəl ˈvɛəriəbl/
US /ˈlɛksɪkəl ˈvɛriəbl/

A lexical variable is a name in a computer program that holds a value and can only be seen inside the part of the code where it was made.

In the function, the lexical variable count keeps track of how many times the loop runs.


OTHER MEANINGS

2. In linguistics, a variable that stands for a word or lexical item rather than a full phrase.

The linguist used a lexical variable to represent any noun in the sentence pattern.

3. A symbol in logic that can be replaced by a word from a vocabulary.

The formula treats the lexical variable as a placeholder for a predicate name.

4. A name whose meaning depends on the surrounding text or context in which it appears.

The editor highlighted the lexical variable so readers could see it changes with context.