From 44dd2e48c052dfcce7de00593f473ef02fcb314c Mon Sep 17 00:00:00 2001 From: eiffel-org Date: Wed, 21 Sep 2016 19:01:49 +0000 Subject: [PATCH] Update wikipage Code Templates. (Signed-off-by:javier). git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@1626 abb3cda0-5349-4a8f-a601-0c33ac3a8c38 --- .../eiffelstudio-editor/Code-Templates.wiki | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/documentation/trunk/eiffelstudio/eiffelstudio-reference/eiffelstudio-editor/Code-Templates.wiki b/documentation/trunk/eiffelstudio/eiffelstudio-reference/eiffelstudio-editor/Code-Templates.wiki index 5cb4d0d6..99acabce 100644 --- a/documentation/trunk/eiffelstudio/eiffelstudio-reference/eiffelstudio-editor/Code-Templates.wiki +++ b/documentation/trunk/eiffelstudio/eiffelstudio-reference/eiffelstudio-editor/Code-Templates.wiki @@ -32,7 +32,7 @@ These templates will inherit a feature `target' with the type of the context, th * Targetless Templates inherit from TEMPLATE These templates does not have the feature `target'. * Metadata: it’s possible to add metadata to code templates using note clause -** title: title of template +** title: title of template, if not present we will use the name of the feature defined in the template. ** tags: List of tags to classify the template. ** default: use to define default values for input arguments. @@ -59,6 +59,16 @@ inherit feature -- Templates + maximum: T + -- Get the maximum of an array. + note + tags: "Algorithm, Maximum, ARRAY" + do + across target as element loop + Result := Result.max (element.item) + end + end + slice_maximum (low, high: INTEGER): T -- Get the maximum of an array, -- where the interval is defined by default by array.lower |..| array.upper.