Ein Literal ist ein spezieller Bestandteil einer formalen Sprache.
Inhaltsverzeichnis |
Mit Literal (lat. littera „Buchstabe“) bezeichnet man in Programmiersprachen eine Zeichenfolge, die zur direkten Darstellung der Werte von Basistypen (z. B. Ganzzahlen, Gleitkommazahlen, Zeichenketten) definiert bzw. zulässig sind.
Man unterscheidet logische (wahr, nicht wahr), numerische und Zeichenliterale. Je nach Programmiersprache gibt es weitere und detailliertere Kategorisierungen für Literale. Damit Literale vom Compiler identifiziert werden können, müssen sie bestimmten syntaktischen Regeln genügen, z. B. (sprachenabhängig und in bestimmten Fällen) in Anführungszeichen eingeschlossen sein.
Literale als Teil von Befehlen werden auch als literale Konstanten oder nicht benannte Konstanten bezeichnet, da sowohl Literale als auch Konstanten zur Laufzeit des Programms unveränderlich sind. Literale dürfen in Zuweisungsoperatoren nur als Sende-Ausdruck (i. d. R. rechtsseitig; 'Zeilen = 60'), als Argument einer Funktion oder als der Wert einer Konstante codiert werden.
Ähnlich dem Literalbegriff kennen manche Programmiersprachen sog. „figurative Konstanten“. Dies sind (z. B. in Cobol) gem. [1] „Cobol-Worte [in unterschiedlichen Schreibweisen, z.B. in Pluralform] für die vom Compiler bestimmte Werte erzeugt werden“: Zero, Space, High-Value und Low-Value, Quote und 'ALL Literal'.
Als Aspekt des Programmierstils wird zum Teil empfohlen, im Befehlsteil des Programmcodes möglichst keine Literale, sondern ersatzweise Konstanten zu verwenden, die im Quelltext beliebig oft angesprochen werden können – anstatt immer das gleiche Literal zu verwenden. Diese Vorschrift soll zu höherer Transparenz und Wartungsfreundlichkeit führen.
| Wahrheitswerte: | true, false | (in vielen Sprachen als reservierte Wörter) |
| Ganzzahlen: | 1200, +1200, -12 | (nur Ziffern und + oder -) |
| Gleitkommazahlen: | 12.34, -12e34, 12.e-34 | (Ziffern, Vorzeichen, Punkt, e) |
| Einzelnes Zeichen: | 'a' | (beliebiges einzelnes Zeichen in Anführungszeichen) |
| Zeichenketten: | "ABCD(12)$ ist eine Zeichenkette" | (mehrere Zeichen in doppelten Anführungszeichen) |
In der mathematischen Logik ist ein Literal eine atomare Aussage (Atom) oder die Negation einer atomaren Aussage. Man hat daher positive Literale und negative Literale. Eine disjunktive Verknüpfung von Literalen bezeichnet man als Disjunktionsterm oder als Klausel.
sensagent's content
Dictionary and translator for handheld
New : sensagent is now available on your handheld
Advertising ▼
Webmaster Solution
Alexandria
A windows (pop-into) of information (full-content of Sensagent) triggered by double-clicking any word on your webpage. Give contextual explanation and translation from your sites !
SensagentBox
With a SensagentBox, visitors to your site can access reliable information on over 5 million pages provided by Sensagent.com. Choose the design that fits your site.
Business solution
Improve your site content
Add new content to your site from Sensagent by XML.
Crawl products or adds
Get XML access to reach the best products.
Index images and define metadata
Get XML access to fix the meaning of your metadata.
Please, email us to describe your idea.
Lettris
Lettris is a curious tetris-clone game where all the bricks have the same square shape but different content. Each square carries a letter. To make squares disappear and save space for other squares you have to assemble English words (left, right, up, down) from the falling squares.
boggle
Boggle gives you 3 minutes to find as many words (3 letters or more) as you can in a grid of 16 letters. You can also try the grid of 16 letters. Letters must be adjacent and longer words score better. See if you can get into the grid Hall of Fame !
English dictionary
Main references
Most English definitions are provided by WordNet .
English thesaurus is mainly derived from The Integral Dictionary (TID).
English Encyclopedia is licensed by Wikipedia (GNU).
Copyrights
The wordgames anagrams, crossword, Lettris and Boggle are provided by Memodata.
The web service Alexandria is granted from Memodata for the Ebay search.
The SensagentBox are offered by sensAgent.
Translation
Change the target language to find translations.
Tips: browse the semantic fields (see From ideas to words) in two languages to learn more.
last searches on the dictionary :
computed in 0.078s