[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.3.3 Examples of Values

As stated above, a value is made of expressions or strings. More importantly, a value is any combination of expressions or strings. When discussing values that are made of such combinations, the word term is used to mean "expression or string".

Examples of valid values:

 
"list-number " listnum
"per capita income: " (gnp / pop)
"Variables Now~~x = " x "~~y = " y

If, for example, the variables in the example above had the following values:

listnum
12
gnp
26
pop
13
x
3
y
5

then the three expression above evaluate to:

 
list number 12
per capita income: 2
Variables Now
x = 3
y = 5

Space is used to separate adjacent terms. It is important to note, however, that the space is not part of the value unless it is enclosed in quotes in a literal string. The expression `"list-number" listnum' (which has no embedded space in the string literal) represents this value:

 
list-number12

Where Bunao can unambiguously determine that a term ends, the space between items can be omitted. This often happens with arrays. For example, these two values are equivalent:

 
A(1) B(1)
A(1)B(1)

The space isn't need because the closing parentheses unambiguously marks the end of the `A(1)' term. These two values, however, are not equivalent:

 
A1B1
A1 B1

The first example is the value of the variable A1B1. The second example is the value of the variable A1 followed immediately by the value of the variable B1.



This document was generated on October, 28 2005 using texi2html