How to get the integer value from a string ?

Submitted by: Administrator
How to get the integer value from a string
print([int]"100")
this returns some different value some 49
need the value 100 to be print


Answer1:
There is one inbuild Silk's function which converts String value into Integer. Try with that
INTEGER iTemp = Val ("100")


Answer2:
Use Val function.....
print (Val("100"))...The int wrapper returns the ASCII value for the string "100"...
Submitted by: Administrator

Read Online SilkTest Job Interview Questions And Answers