I noticed on several places within various languages (C++
, Java
, Python
...)usage of _variable
naming. What does this indicate?
Asked
Active
Viewed 41 times
0

General Grievance
- 4,555
- 31
- 31
- 45

ps-aux
- 11,627
- 25
- 81
- 128
-
In C it was used to declare system / internal variables. And the C programmers learnt Java and introduced it there as well though it is against java naming convention. – Leos Literak Mar 20 '14 at 07:33
-
I suggest you specify a single language, or this may be multiple questions in one. – Ciro Santilli OurBigBook.com Mar 20 '14 at 07:33
-
For Python, possible duplicate of: http://stackoverflow.com/questions/1301346/the-meaning-of-a-single-and-a-double-underscore-before-an-object-name-in-python – Ciro Santilli OurBigBook.com Mar 20 '14 at 07:34
-
In C++ they are reserved keywords http://en.cppreference.com/w/cpp/keyword "begins with an underscore followed by an uppercase letter is always reserved to the implementation and should not be used as an identifier." – Chemistpp Mar 20 '14 at 07:34
2 Answers
0
in c or c++, _ is used start of variable name for some variable used in lib code.to prevent to same name found in your code and the lib. I python _ is used for result that wasn't assigned to a variable .

madan ram
- 1,260
- 2
- 19
- 26