Scalar

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

A scalar is a single numeric value such as 0, 1, -5, -32.6, 1.5e100, 20768314, or 3.14159267 . It consists of a series of characters beginning with an optional + or - sign, one or more of the digits 0 through 9, followed by an optional decimal point with the digits 0 through 9, optionally followed by the letter e (or E), with the digits 0 through 9 representing an exponent, up to the maximum or minimum magnitude a number is allowed to have in APL.

Whenever one single numeric value is used as data, either as a constant or as an APL variable or function, that is a scalar. A group of two or more separate values containing at least one scalar and/or one or more separate single character, scalar, or string values is a vector.