The previous ﬁve sections describe the ﬁve data types used by BayES:
When using assignment statements, BayES infers the type of the item deﬁned from the right-hand side expression. For example, the statement:
deﬁnes a string with id value s and assigns the value "Hello from BayES!" to it. The user does not have to declare s as a string before assigning a value to it: BayES infers that s is a string because the right-hand side expression, "Hello from BayES!", is a string. All functions that operate on strings can be used on s.
Suppose that a subsequent statement in the same script is:
This statement redeﬁnes s as a vector and all functions that operate on matrices can be used with s. Furthermore, BayES deletes the value that s had when it was a string from memory without issuing any error or warning. This means that the same id value can be used in a script to represent diﬀerent data types at diﬀerent points. At every point, however, an id value can be associated with a single data type and previous deﬁnitions are cleared from memory.