Difference between revisions of "Atom"

(Created page with "Category: Objects An atom or an '''atomic value''' denotes a single element -- a number, text string, a handle, a reference, or the value Null, i....")
 
m
 
Line 2: Line 2:
  
 
An [[atom]] or an '''atomic value''' denotes a single element -- a [[number]], [[text]] string, a [[handle]], a [[reference]], or the value [[Null]], i.e. not an [[array]] (table).
 
An [[atom]] or an '''atomic value''' denotes a single element -- a [[number]], [[text]] string, a [[handle]], a [[reference]], or the value [[Null]], i.e. not an [[array]] (table).
 +
 +
A '''scalar''' is simply a single atomic number -- that is not an array.
  
 
Atomic values form the cells of arrays but they may also stand by themselves as values, e.g. the result of evaluating ''1+2'' is the atomic value ''3'', which is not an array. The Title [[attribute]] of any object is an atomic text value.  
 
Atomic values form the cells of arrays but they may also stand by themselves as values, e.g. the result of evaluating ''1+2'' is the atomic value ''3'', which is not an array. The Title [[attribute]] of any object is an atomic text value.  
  
Because an [[atom]] can be seen as a zero-dimensional array, atoms are functionally equivalent to arrays with zero indexes, enabling the conversion of atoms to arrays in some cases. Nevertheless, in standard usage  the term '''atom''' or '''atomic value''' is used to distinguish simple values from "complex" ones like arrays or lists (one-dimensional arrays).
+
Because an [[atom]] can be seen as a zero-dimensional array, an atoms is functionally equivalent to an array with no indexes. In standard usage  the term '''atom''' or '''atomic value''' is used to distinguish a simple value from an array or list (one-dimensional array).
 
 
Because [[atom]]s are not indexed, [[Array Abstraction|array abstraction]] is not always possible on atomic values without a special treatment, see  [[Ensuring_Array_Abstraction#Atom_parameters_and_array_abstraction|Atom parameters and array abstraction]] for details.
 
  
 
==See Also==
 
==See Also==
 
* [[Objects and Values]]
 
* [[Objects and Values]]
* [[Atomic..Do]]
 
 
* [[Function_parameter_qualifiers#Atom|Atomic function parameters]]
 
* [[Function_parameter_qualifiers#Atom|Atomic function parameters]]
 
* [[Ensuring_Array_Abstraction#Atom_parameters_and_array_abstraction|Atom parameters and array abstraction]]
 
* [[Ensuring_Array_Abstraction#Atom_parameters_and_array_abstraction|Atom parameters and array abstraction]]

Latest revision as of 23:38, 24 August 2016


An atom or an atomic value denotes a single element -- a number, text string, a handle, a reference, or the value Null, i.e. not an array (table).

A scalar is simply a single atomic number -- that is not an array.

Atomic values form the cells of arrays but they may also stand by themselves as values, e.g. the result of evaluating 1+2 is the atomic value 3, which is not an array. The Title attribute of any object is an atomic text value.

Because an atom can be seen as a zero-dimensional array, an atoms is functionally equivalent to an array with no indexes. In standard usage the term atom or atomic value is used to distinguish a simple value from an array or list (one-dimensional array).

See Also

Comments


You are not allowed to post comments.