Talk:Greatest element of a list: Difference between revisions
→greatest element ...
(added a comment about the run-time requirement.) |
|||
(One intermediate revision by one other user not shown) | |||
Line 1:
== runtime values ==
"Create a function that returns the maximum value in a provided set of values, '''where the number of values isn't known until runtime'''."
Line 6 ⟶ 7:
:: I added an '''output''' section for the 3<sup>rd</sup> REXX example (for the run-time requirement). It does make this simple task a wee (or just a wee-wee) bit harder to read and understand the underlying program structure/logic; for one thing, you now have to show the user's input(s) (console/terminal/command line/parameters). -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 21:20, 24 February 2017 (UTC)
==greatest element ...==
Does this mean the value, which may imply a numeric value? Or can it also mean a lexicographic value? If the values are numeric, shouldn't the largest numeric value be returned? -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 15:06, 6 October 2018 (UTC)
:In OORexx the result of inheriting Comparable or Orderable and implementing CompareTo. Comparable in Ruby and Java. IComparable in .Net. Python 2 defining __eq__, __lt__ ...(Python 3 has a Comparable Class) etc.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 11:58, 8 October 2018 (UTC)
|