diff --git a/documentation/trunk/eiffel/Language_reference/quick-reference-eiffel-programming-language/Expressions/Manifest-array.wiki b/documentation/trunk/eiffel/Language_reference/quick-reference-eiffel-programming-language/Expressions/Manifest-array.wiki index 00534ed2..15fa3ecb 100644 --- a/documentation/trunk/eiffel/Language_reference/quick-reference-eiffel-programming-language/Expressions/Manifest-array.wiki +++ b/documentation/trunk/eiffel/Language_reference/quick-reference-eiffel-programming-language/Expressions/Manifest-array.wiki @@ -15,7 +15,7 @@ A typed manifest array has an explicit Manifest_array_type that should resolve t {ARRAY [COMPARABLE]} <<7, "beers">> -creates an array of type `ARRAY [COMPARABLE]` with 2 elements: `7` and `beers` and is therefore equivalent to the value of an imaginary variable `x` of type `ARRAY [COMPARABLE]` initialized as follows: +creates an array of type `ARRAY [COMPARABLE]` with 2 elements: `7` and `"beers"` and is therefore equivalent to the value of an imaginary variable `x` of type `ARRAY [COMPARABLE]` initialized as follows: create x.make (1, 0) @@ -23,6 +23,10 @@ creates an array of type `ARRAY [COMPARABLE]` with 2 elements: `7` and `beers` a x.force ("beers", 2) +It would be an error to use `default_pointer` instead of `"beers"` because the type `POINTER` is not `COMPARABLE`. Similarly, one cannot specify `LIST` or a formal generic instead of `ARRAY`. Also, the explicit manifest array type cannot be `separate`. + == Untyped manifest array == -An untyped manifest array has no Manifest_array_type part. As a result, its type is computed from the type of specified elements as a common ancestor type. So, the type of the expression `<<7, "beers">>` would be `ARRAY [ANY]` rather than `ARRAY [COMPARABLE]` as in the previous case because types of the elements do not conform to each other. On the other hand, the expression `<>` has type `ARRAY [BOOLEAN]`. \ No newline at end of file +An untyped manifest array has no Manifest_array_type part. As a result, its type is computed from the type of specified elements as a common ancestor type. So, the type of the expression `<<7, "beers">>` would be `ARRAY [ANY]` rather than `ARRAY [COMPARABLE]` because types of the elements do not conform to each other. On the other hand, the expression `<>` has type `ARRAY [BOOLEAN]`. + +Because there is always a common ancestor type for manifest array elements, the untyped manifest array is always valid as soon as all its elements are valid. The empty untyped manifest array has type `ARRAY [NONE]`. \ No newline at end of file