在VBscript中如何返回两个数中的最大数
编号:QA001366
建立日期: 1999年7月18日 最后修改日期:1999年7月18日
所属类别:
chenlin:
interdev
win95
在VBscript中是否有一种函数能比较两个或多个数的大小,然后返回一个最大数或最小数.
回答:
好象没有,你可以使用下面的函数
Private Function GetMax(a, b)
If a > b Then
GetMax = a
Else
GetMax = b
End If
End Function
Private Function GetMin(a, b)
If a < b Then
GetMin = a
Else
GetMin = b
End If
End Function
此问题由李海回答。
| |
|
|
| |
|
|