Since in C\C++\Java –
int 2a ; //invalid suffix "a" on integer constant
Is there nothing wrong with digits in the rest of variant name although it’s valid syntax ?
Like –
int num1 ;
int num_1st ;
int num_2nd ;
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’ve never heard of anybody (e.g., any coding standards/guidelines) that had a problem with digits in an identifier. Nonetheless, too many of them can indicate that a vector or array might be preferable — even with only two, your
num_1standnum_2ndmight be better asnumbers[2].