Character

From NARS2000
Revision as of 04:48, 3 November 2015 by Paul Robinson (talk | contribs) (new)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This page is intended to define a character, but to prevent creating a circular definition, e.g. "a character is any single character you can type in," I will quote the definition from Wikipedia:

In computer and machine-based telecommunications terminology, a character is a unit of information that roughly corresponds to a grapheme, grapheme-like unit, or symbol, such as in an alphabet or syllabary in the written form of a natural language. Examples of characters include letters, numerical digits, common punctuation marks (such as "." or "-"), and whitespace.

A character is specified either by typing it in or referencing it as a hexadecimal value. A character (except for a number) which to be used as data in an APL statement or to be assigned to a variable must be enclosed in quotes.

Everything in APL is built from characters. Scalars are created from numeric digits, optionally preceded by a sign and optionally followed by a decimal point. Strings are built from multiple characters placed one after another. In NARS2000, characters are 16-bit and thus full Unicode support is available. Where conversions are needed for writing to files, characters may be truncated to 8-bit.