Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python 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
|
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2008 Chilkat Software, Inc. All Rights Reserved.