Chapter 3 The Application Description Language
The constant UNSET is typeless and represents an unset value. It can be assigned to a variable of any type, used in (==) and (!=) comparisons and put on lists. The examples shown in Figure 3.26 are legal.
All uninitialized variables have an unset value. Unset values can appear wherever the constant UNSET can with one exception: the comparison of two values is a run-time error if one or both are unset. You can, however, compare an unset value to the constant UNSET. It is important to distinguish an unset string or list from an empty one. You can append to an empty string or list, but not to an unset one. Unset values can appear in lists, however, and the list append operator ( << ) can append an unset value to a list.
You can use the operator (?var) to test for the existence of an array element and to test if a variable is set.The expression var == UNSET is syntactic sugar for it. Similarly, you can compare array elements with UNSET to determine if they exist. Finally, assigning an array element the constant UNSET is equivalent to calling the operator remove except that it is an error to remove a non-existent element, but you can assign UNSET to one.
Generated with Harlequin WebMaker