Function max(x as single, y as single, z as single)as single
Dim t As single
t = x
If y > t Then t = y
If z > t Then t = z
max = t
MsgBox "最大值" & max
End Function
Function max(x as single, y as single, z as single) as single
Dim T As single
T = Iif( x > y, x, y)
max = Iif( T > z, T, z)
End Function