Added To Each Program That You Write. Term Paper

PAGES
1
WORDS
385
Cite
Related Topics:

¶ … added to each program that you write. A comment is an explanation, written by humans. The compiler ignores comments.

Adding comments to codes is excellent programming practice. Good comments can help browsing the code quickly, keep track of what is done as you build a complex program, and serves as reminder for any modifications. Comments can be used to hide parts of code that needs to be saved for special situations or isolate some portions while you work on something that might cause conflict. In a team of programmers where codes are passed from one individual to another, comments can be a powerful tool to understand the purpose and associations of each part.

Kinds of Comments

Single Line Comments (/ / ... )

Purpose:

Suitable for brief remarks on the function or structure of statement or expression. They require only an opening tag: as soon as you start a new line, you're back into code.

Advantages:

Does not take fair amount of space

Can nest single-line type of comments

Can appear inside multi-line comments

Disadvantages:

Cannot insert a space between the two slashes.

The number of delimiters to be used is equal to the number of lines consumed by a comment.

2. Multi-line Comments (/* ... */)

Purpose:

Good for any comment that will cover more than one line, as when you want to go into some detail about what's happening in the code or when you need to embed legal notices in the code. It requires both opening and closing delimiters.

Advantages:

You can put as many lines of discussion or as many pages of boilerplate as you like between this two tags.

You can nest single-line comments inside of the multi-line comments and the compiler will have no trouble with it at all.

Can act as if it were a single line statement, even though it can contain more than one statement.

Disadvantages:

Cannot nest multi-line types of comments of any sort because that will generate a compiler error.

Multi-line comments take up a fair amount of space. This means that they increase the effective line length.

If the programmer forgot the closing delimiter, it might cause either a run-time or syntax error.

Reference

"The Sofia Open Content Initiative - Java Programming." Sofia Open Content Initiative. 2004.

Sofia Open Content Initiative. 11 May 2005 .

Cite this Document:

"Added To Each Program That You Write " (2005, May 16) Retrieved May 11, 2024, from
https://www.paperdue.com/essay/added-to-each-program-that-you-write-64168

"Added To Each Program That You Write " 16 May 2005. Web.11 May. 2024. <
https://www.paperdue.com/essay/added-to-each-program-that-you-write-64168>

"Added To Each Program That You Write ", 16 May 2005, Accessed.11 May. 2024,
https://www.paperdue.com/essay/added-to-each-program-that-you-write-64168

Related Documents

This in turn adds more pressures on the Australian social and economic structure, making diabetes the seventh most fatal disease in the country. The diagram below proves that fact. Diabetes deaths, 1984-2004 Objectives: The main objective of this research included: An increase in the consumption of fruits and vegetables amongst the sample within the six months allotted for the program. The percentage aimed at was at least 80% To record decrease in the overall

Boeing employs conventional methodology, which involves using multiple layers strategic partners for the Dreamliner project, and this has caused a fundamental delay in the project. To enhance reliability and validity of data analysis, data collected through literature survey are categorized into panel a, panel B, panel C, and panel D. The data collected from these panels are checked whether they are going to deliver the same results, and further

The evaluator was not intrusive and did not intent to pry on the certain aspects that the respondents preferred to leave unanswered. Despite the respect of this principle however, the overall evaluation program was harmed as some support staff took advantage of it and left out some vital pieces of information. The most relevant example in this sense was the incident during which a nurse was held at gunpoint

Program Evaluation Design
PAGES 10 WORDS 3686

Program Evaluation Design constructive, practical, principled and correct process in an organized manner is necessary towards ameliorating and contributing for an efficient program assessment. It has been planned to structure and systematize vital components of program assessment being a realistic and non-rigid instrument. For efficient program assessment, the outline encompasses actions and principles in program assessment. Abiding by the actions and principles of this structure will let an appreciation of

Thus, it is easy to see why the use of medication to treat ADHD is controversial, especially in students who have the disorder in only mild amounts (Boyd and Bee, 2009). However, an option other than medication is available in the form of parent training programs. Boyd and Bee (2009) note that parent training programs intend to help parents who are having trouble controlling their ADHD affected child. According to

Some of the questions that the teacher might ask that will lead to drafting are as follows: At the end of the story, the cow goes home happy, but I'm not sure why. Can we add why the cow goes home happy in there? At the beginning of the story, we talk about three girls, but at the end there are only two. What happened to the other girl?