Why cannot start with numbers? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why cannot start with numbers?

31st Mar 2017, 11:54 PM
O_O_hong
4 Answers
+ 7
A syntax definition directly heritage from c derived languages. Long response: In deep compilers use a lexical corpus for identify vars this is the reason how compiler detects you custom named vars. This works with rules to identify vars, numbers, strings. See what happen is var started with a number. if - 1 - number - is a valid variable name hence: 1234 - is a valid var name, looks like 1234 = 1111 - this line is strange But 1234 is a number this is ambigous and compilers will be break. For this reason var not start with a number
1st Apr 2017, 12:31 AM
nextco
nextco - avatar
+ 1
because its a rule
1st Apr 2017, 12:17 AM
Hari Lamichhane
Hari Lamichhane - avatar
0
Because you can\ 't šŸ˜ŠšŸ˜Š They can\ 't make more easyšŸ˜„
4th Apr 2017, 12:57 PM
Mohammed Raed
Mohammed Raed - avatar
0
just give the awnser
19th May 2017, 7:16 PM
Brandon Ashworth
Brandon Ashworth - avatar