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:
“I am using it [the word perceive] here in such a way that to say of an object that it is perceived does not entail saying that it exists in any sense at all. And this is a perfectly correct and familiar usage of the word.”
—A.J. (Alfred Jules)