Min and Max : Comparing Values
compare the successive values of an iteration, and return the lowest or the highest one.
Inputs and Outputs
Min and max have one default input and three outputs :
- "what" : collects successive values coming from other boxes.
- first output :
triggers the collection and the comparison of these incoming values
lowest or highest collected value at each step of the loop
- second output : returns the lowest or highest value
- third output : reinitializes the accumulator with the highest or lowest possible numbers : 4294967296 and -4294967296. These are comparison references for the next values.
Example : Selecting the Lowest or Higher Value of a List
Listloop enumerates the numbers of a list and returns them successively to min or max.
Each time, the new number is compared to the current value.
If it is higher – max – or lower – min – than the current value, it is stored instead of this current value.
The current value is printed.
The second output of min and max returns the resulting lowest or greatest value of all the list to Finally.