why do we need the token ;? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

why do we need the token ;?

I do not know why we need the token ; in C/C++ and Java to compile you're code, btw I do not like the token ;, also It's annoying to type.

11th Oct 2018, 11:16 PM
Potato Hacker
Potato Hacker - avatar
1 ответ
+ 5
When you toss all whitespace (spaces, tabs, and end of lines), you need to have something to tell you the current statement is complete and not 20 blank lines in the future. This: int x=3;x++;int y=x*20; is identical to: int x = 3 ; x ++ ; int y = x * 20 ;
12th Oct 2018, 2:09 AM
John Wells
John Wells - avatar