Global Information Lookup Global Information

Character literal information


A character literal is a type of literal in programming for the representation of a single character's value within the source code of a computer program.

Languages that have a dedicated character data type generally include character literals; these include C, C++, Java,[1] and Visual Basic.[2] Languages without character data types (like Python[3] or PHP[4]) will typically use strings of length 1 to serve the same purpose a character data type would fulfil. This simplifies the implementation and basic usage of a language but also introduces new scope for programming errors.

A common convention for expressing a character literal is to use a single quote (') for character literals, as contrasted by the use of a double quote (") for string literals. For example, 'a' indicates the single character a while "a" indicates the string a of length 1.

The representation of a character within the computer memory, in storage, and in data transmission, is dependent on a particular character encoding scheme. For example, an ASCII (or extended ASCII) scheme will use a single byte of computer memory, while a UTF-8 scheme will use one or more bytes, depending on the particular character being encoded.

Alternative ways to encode character values include specifying an integer value for a code point, such as an ASCII code value or a Unicode code point. This may be done directly via converting an integer literal to a character, or via an escape sequence.

  1. ^ "Primitive Data Types (The Java™ Tutorials > Learning the Java Language > Language Basics)". docs.oracle.com. Retrieved 2016-09-24.
  2. ^ "Data Type Summary (Visual Basic)". msdn.microsoft.com. Retrieved 2016-09-24.
  3. ^ "5. Built-in Types — Python 2.7.12 documentation". docs.python.org. Retrieved 2016-09-24.
  4. ^ "PHP: Types - Manual". php.net. Retrieved 2016-09-24.

and 22 Related for: Character literal information

Request time (Page generated in 0.81 seconds.)

Character literal

Last Update:

A character literal is a type of literal in programming for the representation of a single character's value within the source code of a computer program...

Word Count : 305

String literal

Last Update:

commonly use a quoted sequence of characters, formally "bracketed delimiters", as in x = "foo", where "foo" is a string literal with value foo. Methods such...

Word Count : 5639

Number sign

Last Update:

field of a record or tuple); also, # prefixes a string literal to turn it into a character literal. In Mathematica syntax, #, when used as a variable, becomes...

Word Count : 4480

Escape sequences in C

Last Update:

text in a character or string literal that represents one or more other characters to the compiler. It allows a programmer to specify characters that are...

Word Count : 1240

Wildcard character

Last Update:

wildcard character is a kind of placeholder represented by a single character, such as an asterisk (*), which can be interpreted as a number of literal characters...

Word Count : 580

C syntax

Last Update:

Like string literals, character constants can also be modified by prefixes, for example L'A' has type wchar_t and represents the character value of "A"...

Word Count : 9787

Apostrophe

Last Update:

Java, C#, and Scala) uses apostrophes to delimit a character literal. In these languages a character is a different object than a one-letter string. In...

Word Count : 16666

IEEE 1164

Last Update:

data type std_ulogic (standard unresolved logic) consists of nine character literals (see table on the right). This system promoted a useful set of logic...

Word Count : 842

Literal and figurative language

Last Update:

Literal and figurative language is a distinction within some fields of language analysis, in particular stylistics, rhetoric, and semantics. Literal language...

Word Count : 1716

XML Literals

Last Update:

embedded in an XML literal, the application creates a LINQ-to-XML object for each literal at run time. String literal Character literal ECMAScript for XML...

Word Count : 90

Escape sequence

Last Update:

science, an escape sequence is a combination of characters that has a meaning other than the literal characters contained therein; it is marked by one or more...

Word Count : 1843

FourCC

Last Update:

as a string. Many C compilers, including GCC, define a multi-character literal behavior of right-aligning to the least significant byte, so that '1234'...

Word Count : 1172

Regular expression

Last Update:

special meaning, or a regular character that has a literal meaning. For example, in the regex b., 'b' is a literal character that matches just 'b', while...

Word Count : 8915

Character amnesia

Last Update:

Character amnesia is a phenomenon where experienced speakers of some East Asian languages forget how to write Chinese characters previously well-known...

Word Count : 1720

Integer literal

Last Update:

the string literal – at the syntactic level "1" is simply a string, no different from "foo". Recognizing a string (sequence of characters in the source...

Word Count : 1109

Lexical analysis

Last Update:

wide-character string literal. A lexeme, however, is only a string of characters known to be of a certain kind (e.g., a string literal, a sequence of letters)...

Word Count : 3323

Null character

Last Update:

0, called the null character, shall exist in the basic execution character set; it is used to terminate a character string literal." — ANSI/ISO 9899:1990...

Word Count : 959

Escape character

Last Update:

languages specify the double-quote character (") as a delimiter for a string literal. The backslash (\) escape character typically provides two ways to include...

Word Count : 1503

Delimiter

Last Update:

to escape characters, except they usually consist of some kind of mnemonic instead of just a single character. One use is in string literals that include...

Word Count : 2389

Catgirl

Last Update:

characteristics on an otherwise human body. They are not individuals who are literal cats but individuals who only look superficially feline. Catgirls are found...

Word Count : 698

Dollar sign

Last Update:

supported language. In Erlang, the dollar sign precedes character literals. The dollar sign as a character can be written $$. In COBOL the $ sign is used in...

Word Count : 4530

Literal music video

Last Update:

A literal music video, also called a literal video version, is a satirical remix of an official music video clip in which the lyrics have been replaced...

Word Count : 2522

PDF Search Engine © AllGlobal.net