Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
Convert a String to a Number (Integer)Use the Val function to convert a string to a decimal number. The Val function is not locale aware, so it will not recognize comma decimal separators in countries where this is used, such as "1,000,000".
Dim v As Integer
v = Val("100 Blah Blah")
Print v ' prints 100
v = Val("Nothing")
Print v ' Could not convert, prints 0
|
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.