History |
Val (strings)
Purpose
Returns the numeric value of a string argument.
Syntax
Val (StringExpression)
Example
Sub Main()
'this program converts string "50" into a number and then uses the number in a math calculation
Dim s As String
Dim num As Integer
s = "50"
num = Val(s)
Print "The numeric value of 's' times 5 is: ",num *5
End Sub
| ||||