mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-06 23:02:28 +01:00
Update wikipage Code Templates. (Signed-off-by:javier).
git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@1626 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -32,7 +32,7 @@ These templates will inherit a feature `target' with the type of the context, th
|
||||
* Targetless Templates inherit from <code>TEMPLATE</code>
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user