Brad Dwan wrote:As mentioned above, you could simply add another variable and let it contain the max value.
eg.
Thats just an example of how to achieve it, but there are other ways that are more refined.
we cant use if variable, we can use trilinear operator.
could you transfer this to a trilinear expression: (i added a max=0 variable above the loop method)
if(n1 > max) {max = n1;}
Edit:
i actually got it..here is the correct expression:
max=(n1>max)?n1:max;
thanks. problem resolved