Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What does val stand for in VB?
What does val stand for in VB?
VAL stands for the val () function.

Function: Returns the numeric value of a character expression consisting of numbers.

Syntax structure value (expression)

Among them, the character expression consists of 16 bits at most, and it is rounded if it exceeds 16 bits.

For example:

Store "12" in a

Store "13" in B.

VAL(A)+VAL(B) shows 25.00.

Supplementary explanation:

VAL () is a function used to convert a numeric string into a numeric value.

That is, the number symbol of the character type (c) is converted into the number symbol of the number type (n).

VAL(" 1.234 ")& amp; & The result is 1.23.

VAL(" a 1.256 ")& amp; & The result is 0.00.

VAL(" 1a . 234 ")& amp; & The result is 1.00.

However, if there is non-character data in the string, only the first part will be converted; If the first character of the string is not a numeric symbol, it returns a value of 0, but the leading space is ignored.