Recently I wrote these functionsFunction Min(a, b)
if a > b then
Min = b
else
Min = a
end if
end function
Function Max(a, b)
if a > b then
Max = a
else
Max = b
end if
end function
but soon realised that they could be shorterFunction Min(a, b)
Min=a:if a>b then Min=b
end function
Function Max(a, b)
Max=a:if b>a then Max=b
end function
Thats 23 characters including spaces for the middle line of each function (excluding the outer Function() and End Function lines.
Can you do better? No prize, just the glory of being the best.
Must be in vb.
Functions must be named Min and Max.