0
Why a-variable-name ia not a valid variable name?
2 Antworten
+ 2
Because it has the '-' character. A valid name would be a_variable_name.
+ 2
Depends upon the programming language. For some it's valid, for some others it isn't. If I were to guess as to why, I'd say it's because '-' is also an operator symbol, but I'm merely speculating.
https://en.wikipedia.org/wiki/Naming_convention_(programming)