Cancel
Showing results for 
Search instead for 
Did you mean: 

Function max of several times

Creator
Creator

Hello, I would like to obtain the maximun of 4 times in a method. Is there any function to do that as MAX()?

 

Thank you

2 REPLIES

Re: Function max of several times

Genius
Genius

"Max" works with time so maybe this way :

 

var testTime : time[4] := [1:0,2:0,5:0,3:0]

print testTime.max -- 5:0

Re: Function max of several times

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
you can encapsulate it:

m:=max(max( max(val1,val2),val3),val4)

and so on
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net