
David W. answered 04/28/19
Experienced Prof
Consider the assignment statement:
Y = 3x + 2
This is the slope-intercept form of the equation of a line. The current value of the variable x (note: programming languages may or may not generate code that retrieves this value before a value has been set). That value is multiplied by 3 (a literal; always 3), then 2 (another literal) is added and the total is stored in the variable Y (replacing the previous value stored in Y).
Note that a Von Neumann architecture computer stores both program and data in the same memory. If, either by accident or by clever programming, the value stored in the literal 3 in memory becomes 4, the computer uses the 4 although the program initially said it should be 3.
So, the distinction is not between a literal value and a value; it is between a literal and a variable. They are identified differently in the Symbol Table when the program is compiled or interpreted.