Does anyone know how to get the biggest number in a list?
I mean, for example, from the list below,
[10 12 34 20 25(
I wanna get the number '34' alone.
Kind regards, yumori.
How to get the biggest number in a list?
Does anyone know how to get the biggest number in a list?
I mean, for example, from the list below,
[10 12 34 20 25(
I wanna get the number '34' alone.
Kind regards, yumori.
Hi Yumori and welcome to this forum.
If you are using pdextended or pdl2Ork, you can use the object [max_n]. It will outputs the largest number in the last n numbers. You use it like this:
[10 12 34 20 25(

[max_n 5]

[nbx]
So in the case above, [max_n 5] will look at all previous 5 numbers it received and output the largest one. Similarly, you can also use [min_n].
Take care,
Gilberto
@gsagostinho Thank you very much!!! I didn't know that method. If I use this and [list length] together, I can get the biggest number from any lists. I appreciate your kindness. Thank you so much
Here is the vanilla abstraction I made some time ago...
listmax.pd
listmaxhelp.pd
It is based on abstraction by sebfumaster.
_xb
Oops! Looks like something went wrong!