Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Apostrophe
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Programming=== Some programming languages, like [[Pascal (programming language)|Pascal]], use the ASCII apostrophe to delimit [[string literal]]s. In many languages, including [[JavaScript]], [[ECMAScript]], and [[Python (programming language)|Python]], either the apostrophe or the double quote may be used, allowing string literals to contain the other character (but not to contain both without using an [[escape character]]), e.g. <code>foo='He said "Bar!"';</code>. Strings delimited with apostrophes are often called ''single quoted''. Some languages, such as [[Perl]], [[PHP]], and many shell languages, treat single quoted strings as "raw" strings, while double quoted strings have expressions (such as <code>"$variable"</code>) replaced with their values when interpreted. The [[C (programming language)|C programming language]] (and many [[List of C-family programming languages|derived languages]] like [[C++]], [[Java (programming language)|Java]], [[C Sharp (programming language)|C#]], and [[Scala (programming language)|Scala]]) uses apostrophes to delimit a [[character literal]]. In these languages a character is a different object than a one-letter string. In [[C++]], since [[C++14]], apostrophes can be included as optional digit separators in numeric literals. In [[Visual Basic]] (and earlier Microsoft BASIC dialects such as QuickBASIC) an apostrophe is used to denote the start of a comment.{{NoteTag|As a comment character in MS BASIC, the apostrophe is in most cases an abbreviation of the REM statement, which can be appended to the end of almost any line with a colon (:). The cases where the apostrophe is not an abbreviation for <code>REM</code> would be those where the apostrophe is allowed but a REM statement is not. Note that there are also cases of the reverse constraint; for example, in QuickBASIC, a comment at the end of a DATA statement line cannot start with an apostrophe but must use <code>: REM</code>.}} In the [[Lisp (programming language)|Lisp]] family of programming languages, an apostrophe is shorthand for the <code>quote</code> operator. In [[Rust (programming language)|Rust]], in addition to being used to delimit a character literal, an apostrophe can start an explicit [[Object lifetime|lifetime]].
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Apostrophe
(section)
Add topic