quarta-feira, 8 de fevereiro de 2012

@Min and @Max on LotusScript lists

Ref: Notes/Domino 6 and 7 Forum


 ********** MAX **********
Function Max(numList List As Integer) As Integer

Dim iMax As Integer
iMax = -32768

Forall num In NumList
If(num > iMax) Then iMax = num
End Forall
Max = iMax

End Function

' ********** MIN **********
Function Min(numList List As Integer) As Integer

Dim iMin As Integer
iMin = 32767

Forall num In NumList
If(num > iMin) Then iMin = num
End Forall
Min = iMin

End Function

Nenhum comentário:

Postar um comentário