📜  VBScript-数字

📅  最后修改于: 2020-10-19 04:08:09             🧑  作者: Mango


数字功能可帮助开发人员高效地处理数字,并帮助他们转换其子类型。它还可以帮助他们利用与VBScript关联的内置数学函数。

号码转换功能

数字功能可帮助我们将给定的数字从一种数据子类型转换为另一种数据子类型。

显示范例

Sr.No Function & Description
1

CDbl

A Function, which converts a given number of any variant subtype to double

2

CInt

A Function, which converts a given number of any variant subtype to Integer

3

CLng

A Function, which converts a given number of any variant subtype to Long

4

CSng

A Function, which converts a given number of any variant subtype to Single

5

Hex

A Function, which converts a given number of any variant subtype to Hexadecimal

数字格式化功能

数字格式化功能可帮助开发人员以他们希望的格式表示给定的数字。

显示范例

Sr.No Function & Description
1

FormatNumber

A Function, which would return an expression formatted as a number

2

FormatPercent

A Function, which would return an expression formatted as a percentage

数学函数

数学函数可帮助我们评估给定输入数字的数学和三角函数。

显示范例

Sr.No Function & Description
1

Int

A Function, which returns the integer part of the given number

2

Fix

A Function, which returns the integer part of the given number

3

Log

A Function, which returns the natural logarithm of the given number. Negative numbers disallowed

4

Oct

A Function, which returns the Octal value of the given percentage

5

Hex

A Function, which returns the Hexadecimal value of the given number

6

Rnd

A Function, which returns a random number between 0 and 1

7

Sgn

A Function, which returns a number corresponding to the sign of the specified number

8

Sqr

A Function, which returns the square root of the given number. Negative numbers disallowed

9

Abs

A Function, which returns the absolute value of the given number

10

Exp

A Function, which returns the value of e raised to the specified number

11

Sin

A Function, which returns sine value of the given number

12

Cos

A Function, which returns cosine value of the given number

13

Tan

A Function, which returns tan value of the given number