Convert the single to an integer - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: Convert the single to an integer (/Thread-Convert-the-single-to-an-integer) |
Convert the single to an integer - Mozza - 09-26-2018 I have a function that returns a number This number is type = single How can I convert the single to an integer Rand is returned a example 10 type single The following do not work CInt(Rand) = RandomNumberBetween(0,11) FormatNumber(Rand) = RandomNumberBetween(0,11) RE: Convert the single to an integer - Mozza - 09-26-2018 Problem solved I was putting the CInt in the wrong spot Rand = CInt(RandomNumberBetween(0,11)) Working now - maybe this will be useful for someone else RE: Convert the single to an integer - Ankur - 09-27-2018 Thanks for your thoughtfulness. It will surely help others. |