Val Function

Converts a string to a numeric expression.

αƒ‘αƒ˜αƒœαƒ’αƒαƒ₯αƒ‘αƒ˜


Val (გეαƒ₯αƒ‘αƒ’αƒ˜ როგორαƒͺ αƒ‘αƒ’αƒ αƒ˜αƒ₯αƒαƒœαƒ˜)

αƒ“αƒαƒ‘αƒ αƒ£αƒœαƒ”αƒ‘αƒ£αƒšαƒ˜ αƒ›αƒœαƒ˜αƒ¨αƒ•αƒœαƒ”αƒšαƒαƒ‘αƒ:

Double

Parameters:

Text: String that represents a number.

Using the Val function, you can convert a string that represents numbers into numeric expressions. This is the inverse of the Str function. If only part of the string contains numbers, only the first appropriate characters of the string are converted. If the string does not contain any numbers, the Val function returns the value 0.

Error codes:

D'oh! You found a bug (text/sbasic/shared/00000003.xhp#err5 not found).

αƒ›αƒαƒ’αƒαƒšαƒ˜αƒ—αƒ˜:


Sub ExampleVal
    MsgBox Val("123.123")
    MsgBox Val("A123.123")
End Sub

Please support us!