+ 14
What is the use of "comment" in the programing languages ? I did't get the use of this feature in the programming ?
30 ответов
+ 12
In most cases when you look at your own code after few months you find it difficult to comprehend straight away so generally what programmers do is they write comments. It may describe what is the variable storing or what that particular line of code is trying to do. Or in case if you want to document your code then comments are very vital for that purpose.
+ 18
You can use the comments to explain your code.
Comments are added with the purpose of making the code easier to understand.
And comments are ignored by compiler at run time.
+ 12
Comments are used in programming for better understanding of code...the things we write in comments describes for what purpose we have written the statement
For example
//sum of a and b
S=a+b;
Here comment describing for what purpose we have written s=a+b; and this comments will ignore by compiler at the time of execution of code
+ 6
It helps the programmer of the code and other people who work on it to understand complex code.
+ 6
Guys avinesh is right thank you so much for your help all of you are so sweet
+ 5
So it is an proffesional way write a program thank u mr .avinesh 🤗
+ 5
Hope you understand now after all the answers.
+ 4
Thanks to all of you for kindness and help i am really filling glad and satisfied with the answers
+ 4
Guys your answers are appreciated but if you can see that the one who has posted the question has got his answer already then their in no point in repeating the already posted answers. There are a lot of unanswered questions so kindly help them.
+ 3
Because comments are not displayed on the web-page so it helps you to edit your codes.
+ 3
Comments are most useful in the organizing and explaining of your codes. They won't be displayed but they explain codes well
+ 3
Comments help explain your code, not only what something does, but also why you chose to accomplish it in that manner. Comments are extremely important for professional devlopers working together on the same code, and they will also be helpful when you go back later on to remember why you did something.
+ 3
1st use: To explain the codes.
2nd use: To Hide Some lines of codes temporarily for testing purpose.
https://code.sololearn.com/ctywyMlYGYN4/?ref=app
+ 3
i had one time that i dont bother writing comments for simple react project.
a year later my client want to add new feature, change how it looks etc etc.
i open up my project then be like "what the **** is this, what this do, why i use this function, etc etc"
so yeah, do use comments.
it will save you a lot of time.
+ 3
Its a very handy practice.
"Comments are useless in programming" - will be fully frustrating after just couple of days. You will just forget what you did, what that those or this means, what you will do etc. And configuring them out will cost you much time. Moreover comments increases the readabilty.Also if your code doesnt compile just comment out some sections you edited last and run...you will easily track down the bug.
Keep programming and you will know the use of /* ummm also get used to */ that feature.
+ 3
well! even i used to think the same. now the perspective has changed.
so, here is the main use of commenting.
As a code developer of a system, you may know all the data of code on the module you have prepared. in case, may be in future when the system needs to be advanced, then the people belongs to that era will be changing the code. for that, they need to understand about what exactly the code or block or a statement is referring and building. To make it easy, we write the comments and document them.
thank you! hope it helps you.
+ 3
Comments are a sequence of characters, which a language translator, like interpreter or compiler, ignores to translate. They are used for giving a basic information related to any part of your program.
For example, I'm a programmer and I wrote a program and gave it to you, how will you get to know what the program is for? Its very difficult to understand large and complex programs. So I'll put comments in my program so that the logic that I've used in different parts of my program is clear to you. Comments will make it easy for you to understand the logic behind my code and you'll be easily able to edit it, modify it, without even reading the whole program for the same.
I hope I'm clear to you buddy😊
+ 3
Comments are a sequence of characters, which a language translator, like interpreter or compiler, ignores to translate. They are used for giving a basic information related to any part of your program.
For example, I'm a programmer and I wrote a program and gave it to you, how will you get to know what the program is for? Its very difficult to understand large and complex programs. So I'll put comments in my program so that the logic that I've used in different parts of my program is clear to you. Comments will make it easy for you to understand the logic behind my code and you'll be easily able to edit it, modify it, without even reading the whole program for the same.
I hope I'm clear to you buddy😊
+ 2
Yes very true and highly recommended
+ 2
You don't have to read and translate the code. It is possible to skip directly to the relevant parts of a program.