Variables in S procedures are named data objects, to which values can be assigned. They are addressed by means of their variable names. Variables in S procedures are also referred to as S variables.
A distinction must be made between two types of “variable” (or “variable types”):
simple variables
complex variables
Simple variables are not divisible, while complex variables are made up of one or more elements. The elements of complex variables (= variable elements) can themselves be simple or complex variables.
The term “variable element” is applied only to those elements on the highest level of a complex variable. If the variable elements themselves are complex variables, their elements are not considered to be elements of the superordinate complex variables.
There are three different types of complex variables:
lists (= list variables)
arrays
structures
These complex variables differ in their variable names, internal structure and the way in which the variable elements are addressed.
The sections below first describe simple variables, then complex variables in general and, finally, the various types of complex variables (lists, arrays, structures).