mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-07 07:12:25 +01:00
Update wikipage Code Templates. (Signed-off-by:javier).
git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@1618 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -34,19 +34,18 @@ class ARRAY_TEMPLATE [T -> COMPARABLE]
|
|||||||
|
|
||||||
inherit
|
inherit
|
||||||
|
|
||||||
TEMPLATE [ARRAY [T]]
|
TEMPLATE [ARRAY [T]]
|
||||||
|
|
||||||
feature -- Templates
|
feature -- Templates
|
||||||
|
|
||||||
slice_maximum (low, high: INTEGER): T
|
slice_maximum (low, high: INTEGER): T
|
||||||
-- Get the maximum of an array, where the interval is defined by default by array.lower |..|
|
-- Get the maximum of an array, where the interval is defined by default by array.lower |..| array.upper.
|
||||||
-- array.upper.
|
|
||||||
note
|
note
|
||||||
tags: "Algorithm, Maximum, ARRAY"
|
tags: "Algorithm, Maximum, ARRAY"
|
||||||
default: "a.lower, a.upper"
|
default: "target.lower, target.upper"
|
||||||
do
|
do
|
||||||
across low |..| high as i loop
|
across low |..| high as i loop
|
||||||
Result := Result.max (a [i.item])
|
Result := Result.max (target [i.item])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user