From 07c92730f02083a340dc50d2a4000e951a07a160 Mon Sep 17 00:00:00 2001 From: eiffel-org Date: Fri, 15 Jun 2018 08:47:10 +0000 Subject: [PATCH] Removed unnecessary spaces. Updated wikipage Manifest array. (Signed-off-by:alexk). git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2039 abb3cda0-5349-4a8f-a601-0c33ac3a8c38 --- .../Expressions/Manifest-array.wiki | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/documentation/18.01/eiffel/Language_reference/quick-reference-eiffel-programming-language/Expressions/Manifest-array.wiki b/documentation/18.01/eiffel/Language_reference/quick-reference-eiffel-programming-language/Expressions/Manifest-array.wiki index b57687c8..1d652ce3 100644 --- a/documentation/18.01/eiffel/Language_reference/quick-reference-eiffel-programming-language/Expressions/Manifest-array.wiki +++ b/documentation/18.01/eiffel/Language_reference/quick-reference-eiffel-programming-language/Expressions/Manifest-array.wiki @@ -11,21 +11,24 @@ The type of a manifest array is always `ARRAY [T]` where `T` is a type to which Use a manifest array to initialize an element by simply listing its initial elements. For example, with the declaration ```eiffel - squares: ARRAY [INTEGER] +squares: ARRAY [INTEGER] ``` you can initialize `squares` through ```eiffel - squares := <<1, 4, 9, 16, 25>> +squares := <<1, 4, 9, 16, 25>> ``` This is simpler than the alternative, which would be to create the array explicitly and give a value to every element in turn: ```eiffel - create squares .make_filled (0, 1, 5) - -- Arguments to `make_filled' are: default value, lower bound, upper bound. - squares [1] := 1 ; squares [2] := 4 ; squares [3] := 9 - squares [4] := 16 ; squares [5] := 25 + -- Arguments to `make_filled` are: default value, lower bound, upper bound. +create squares.make_filled (0, 1, 5) +squares [1] := 1 +squares [2] := 4 +squares [3] := 9 +squares [4] := 16 +squares [5] := 25 ``` The first form, with the manifest array, is shorter, but the effect is the same. @@ -33,8 +36,8 @@ The first form, with the manifest array, is shorter, but the effect is the same. Manifest arrays are normal arrays, not restricted in any way. You can for example add elements to them, as in ```eiffel - squares.force (36, 6) - -- Arguments to `force' are: value, position. + -- Arguments to `force` are: value, position. +squares.force (36, 6) ``` which will resize the array to bounds 1 and 6.