Commenting and Remarks
The DarkBasic Professional IDE (Integrated development environment) gives you, the developer, the ability to exclude certain written statements from being read or parsed by the DarkBasic compiler. These excluded lines of code or just plain text are referred to as comments or remarks.
Most of the time you can understand the meaning of source code written by yourself, or even code designed and written by other developers. The simplicity of the DarkBasic Professional coding language also makes the deciphering of code much easier. However, resuming a month old, 6 month old, or even a year old project while trying to remember the meaning of all your old code and functions, without having made use of comments or remarks, would likely be a daunting task.
In DarkBasic Professional there are three ways to comment out text or lines of code. Here is summary of each:
Perhaps the most common method of constructing remarks or comments is to type the "REM" statement in front of the line you wish to exclude from the compiler.
Example code:
REM Declaration of My Function
My_Function:
PRINT "My Function!"
Return
Another, and perhaps more discreet, method of commenting or remarking a line of code would be to place the "`" symbol infront of the desired line to commented.
Example Code:
` Display a Message on Screen
PRINT "This is a Message on the Screen"
If you would like to comment out an entire section or block of code simply use the REMSTART and REMEND commands. Place REMSTART above the first line of code and REMEND under the last line.
Example code:
REMSTART
My Game
2009-10
10/10/10
REMEND
The REMSTART and REMEND commands are also useful when you want to ignore a section of code for debugging purposes or any other purpose.
Published by James Cloud
I like to program and do basically anything that has to do with technology and computers. View profile
When Home Improvements Should Be Left to a ProfessionalMany projects that seem like a do it yourself kind of job actually require a professional. Here are some tips on do it yourself home improvements and when you should seek profe...- Professional Make-Up TipsWhatever the reason, there are days when every woman looks into her mirror and doesn't like what she sees. Understanding basic cosmetics can help but so can these professional tips and tricks.
- How to Dress Like a Professional Working ManIn the professional world, looking the part is every bit as important as acting the part. Men have to dress to impress in order to get attention and respect in their professional endeavors.
- There is No Such Thing as Pro-Life or Pro-ChoiceI find it hard to take Pro-Life and Pro-Choice activists serious..
- Product Review: Crest Pro-Health Mouth WashI love mouth wash, but I am not a big fan of how much it usually burns. I find it very hard to keep that much mouth wash in my mouth for thirty seconds. So, when I discovered Crest Pro-Health, I was very happy.
- The Disgraceful State of Professional Sports
- Accounting Continuing Professional Education
- 10 Tips to Make Your Home Based Business Look Professional
- The Oral B Professional Care 9400 Triumph is a Triumph
- How to Give Your Home Business a Professional Image
- How to Write for a Professional Magazine
- How to Hire a Professional Belly Dancer



