Scalar: Difference between revisions

From NARS2000
Jump to navigationJump to search
No edit summary
(update)
 
Line 1: Line 1:
A '''scalar''' is a single numeric value such as 0, 1, 20768314, or 3.14159267 . Whenever one numeric value is used, either as a constant or as an APL variable or function, that is a scalar. A group of more than one single scalar is a [[vector]].
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 [[character]]s 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]].


[[Category:Data types]]
[[Category:Data types]]

Latest revision as of 05:10, 3 November 2015

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.