SilkTest Question: Download Questions PDF
How to retrieve the decimal part of value stored in float variable. Also how to retrieve the Integer part? Is there a function?
Answer:
the snippet code for the prob.
[ ] real rVal1=89.822 // Assume your real number is rVal1
[ ] integer iValue = [int]rVal1
[ ] real rVal2= rVal1-iValue
[ ] print(iValue) // Integer part of u r number
[ ] print(rVal2) // Decimal part of u r number
[ ] real rVal1=89.822 // Assume your real number is rVal1
[ ] integer iValue = [int]rVal1
[ ] real rVal2= rVal1-iValue
[ ] print(iValue) // Integer part of u r number
[ ] print(rVal2) // Decimal part of u r number
Download SilkTest Interview Questions And Answers
PDF
Previous Question | Next Question |
Can anybody explain me, where does logs get stored for an activity performed in Silktest? | Is there a way to handle this type of issue? |