Computing Usage
The semicolon is represented by Unicode and ASCII character U+003B ; semicolon (59decimal). The EBCDIC semicolon character is 94 or 0x5E. Scripts comprising wide characters, such as kanji, use a full-width equivalent, ;, located at Unicode code point U+FF1B (fullwidth semicolon).
In computer programming, the semicolon is often used to separate multiple statements (for example, in Perl, Pascal, PL/I, and SQL). In other languages, semicolons are called terminators and are required after every statement (such as in Java, and the C family). Other languages (for instance, some assembly languages and LISP dialects) use semicolons to mark the beginning of comments. Additionally, the semicolon stands for a NOP (no operation or null command) in C/C++, useful in busy waiting synchronization loops.
Example C++ code:
int main(void) { int x, y; x = 1; y = 2; // Two statements are separated by the semicolon std::cout << x << std::endl; while (wait_event) ; return 0; }Conventionally, in many languages, each statement is written on a separate line, but this is not typically a requirement of the language. In the above example, two statements are placed on the same line; this is legal, since the semicolon separates the two statements.
The semicolon is often used to separate elements of a string of text. For example, multiple e-mail addresses in the "To" field in some e-mail clients have to be delimited by a semicolon.
The semicolon is commonly used as parts of emoticons, in order to indicate winking.
In Microsoft Excel, the semicolon is used as a list separator, especially in cases where the decimal separator is a comma, such as 0,32; 3,14; 4,50
, instead of 0.32, 3.14, 4.50
.
In MATLAB, the semicolon can be used as a row separator when defining a vector or matrix (whereas a comma separates the columns within a row of a vector or matrix) or to execute a command silently, without displaying the resulting output value in the console.
In HTML, a semicolon is used to terminate a character entity reference, either named or numeric.
Read more about this topic: Semicolon
Famous quotes containing the word usage:
“...Often the accurate answer to a usage question begins, It depends. And what it depends on most often is where you are, who you are, who your listeners or readers are, and what your purpose in speaking or writing is.”
—Kenneth G. Wilson (b. 1923)