In the world of programming, you are going to find two kinds of coders. Those that put comments in their code and those that hate mankind and have no respect for their fellow coders!
Putting comments in your code will help others to see what you are doing and help yourself to remember what you had in mind when you started this project but come back to it days or weeks later.
Comments are a great way to put in ideas or a "to-do" list and the BaCon converter will ignore them when it is time to convert/compile. So comments will not add any size to your compiled program! Make all the comments you want, its free......
You can read about comments on Wikipedia.
Putting comments in your code will help others to see what you are doing and help yourself to remember what you had in mind when you started this project but come back to it days or weeks later.
Comments are a great way to put in ideas or a "to-do" list and the BaCon converter will ignore them when it is time to convert/compile. So comments will not add any size to your compiled program! Make all the comments you want, its free......
You can read about comments on Wikipedia.
Making a Comment!
Making comments is a quick and easy thing to do. To make a comment, start your line with a Apostrophe. In this first example I commented out the name and version number of my program as this is for my reference and is not needed for the program to compile and run.
' ob-logout.bac ver1.02
A comment can be used to make a note for someone to read like this:
' Create your main working window 300 pixels wide X 400 pixels high
Or it can be used to make a separator in your code so you can section your code for easier reading and navigation like this:
'----------------------------SUB Routines---------------------------
And one more thing, comments can be used as a debugging tool. For example, if you are having a hard time figuring out which line of code is hanging up your app, you can comment out one of the lines to see if your code will now compile. If not, un-comment the line and comment out the other one. This can also help if you want to test some part of the compiled app but some of the code is missing for another part of the app. This will allow you to run the code with missing features.
' ob-logout.bac ver1.02
A comment can be used to make a note for someone to read like this:
' Create your main working window 300 pixels wide X 400 pixels high
Or it can be used to make a separator in your code so you can section your code for easier reading and navigation like this:
'----------------------------SUB Routines---------------------------
And one more thing, comments can be used as a debugging tool. For example, if you are having a hard time figuring out which line of code is hanging up your app, you can comment out one of the lines to see if your code will now compile. If not, un-comment the line and comment out the other one. This can also help if you want to test some part of the compiled app but some of the code is missing for another part of the app. This will allow you to run the code with missing features.
So make comments and comment often!