COMP 202 Lecture Notes - Lecture 3: Bracket, Computer Programming, Concatenation
jc123 and 40170 others unlocked
100
COMP 202 Full Course Notes
Verified Note
100 documents
Document Summary
Broadly speaking, there are three different kinds of lines" of code that you can write: code that defines where a block {starts and ends}. These either end with an open curly bracket, or the whole line is a single close curly bracket: a line of code that does something. These are statements and end with a semi-colon: a comment. A multiline comment starts with /* and ends with */ In order to make your code more readable, there are rules about when to have new lines, and how to indent things. When you have an open curly bracket, a close curly bracket, or a statement ending in a semi- colon, you should press enter and continue writing on a new line (there are a few exceptions to this rule). When you start a new block (have an open curly bracket), all subsequent lines should be indented (tabbed).