Valid on UNIX and Windows
The ValEx function converts the input string, which specifies a decimal, a hexadecimal, or an octal number, to an integer.
Function format:
ValEx(str as String) as Integer
The string specifies a decimal, a hexadecimal, or an octal number, and can include a sign. The number specified is converted to an integer.
The function returns the integer value of the input string. If the string cannot be converted to a number, the function returns 0.
Example:
Dim i As Integer
i = Val("2735")
Print("Val(""2735"")"+Str(i))
i=ValEx("2735")
Print("ValEx(2735")
Print("ValEx(""2735"")="+str(i))
i=ValEx("01414")
Print("ValEx(""01414"")="+str(i))
i=ValEx("0x1414")
Print("ValEx(""0x1414"")="+str(i))
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|