11-19-2023, 07:46 PM
(11-19-2023, 06:18 PM)Dimster Wrote: Is there a reason why a variable name can not begin with a numerical value? ie a1 = 100 is ok but 1a = 100 or 1a$ = "100" is not ok.
Not that I know a heck of a whole lot about interpreters/compilers parsing and tokenising (?) a program, but I imagine there's value in the process knowing immediately that:
- it is dealing with a literal number (because of a digit)
- versus it is dealing with a literal string (because of a double-quote)
- versus it is dealing with an identifier (variable, constant, function ... because of an alphabetic character)
I think.