5.5 Common User Errors

The following are common user errors, which you can anticipate and avoid by reading about them in advance.

Forgetting the semicolon: CSS, being essentially like C or C++, requires most statements to end with a semicolon (;). This allows one to spread statements over multiple lines, since the semicolon and not the newline indicates the end of a statement. However, it is easy to forget it when typing stuff in interactively. The consequences of this are that the following command or statement will be treated as if it was part of the one where the semicolon was forgotten, usually resulting in a Syntax Error. Note that commands are exempt from the semicolon requirement, and, as a corollary, can not be extened across multiple lines.

Delayed impact of syntax error: This happens when the user types in something erroneous (i.e., something that will result in a Syntax Error), without following it with a semicolon (usually because it was supposed to be a command, which does not require a semicolon). However, because the entry was neither a command nor followed by a semicolon, it treats the following material as being on the same line, so that only after the second line has been entered (typically), is the first syntax error caught. The solution is to simply press enter a couple of times (or hit the semicolon and press enter), which will clear out the preceding line and let you continue on.

Trying to print or do something else with a void: If an expression cannot be evaluated (resulting in a void value), or a function is called which returns a type of void (i.e., nothing is returned), and the result of this expression is then printed or passed to some other function, the following error will result: Incomplete argument list for: <function_name>, Should have: 1 Got: 0. Since the void does not get passed to the function or command which is expecting an argument, the function/command (typically print) complains with the above error.