Method: Log for VBS
- 已更新2024-09-12
- 閱讀時間為 1 分鐘
Methods > Method: Log for VBS
Method: Log for VBS
Specifies the natural logarithm of a number.
vLog = Object.Log(number)
| Object | VBS Object with this method. You do not need to specify this object. |
| number | Variant Specifies any numeric expression that is greater than 0. |
| vLog | Variant Receives the natural logarithm of a number. |
The following example calculates the natural logarithm of a number:
Dim MyVar MyVar = Log(2.718) ' Returns 0.999896315728952 Call MsgBox(MyVar)