Error in getting sum of numbers program - 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: Error in getting sum of numbers program (/Thread-Error-in-getting-sum-of-numbers-program) |
Error in getting sum of numbers program - QTpier - 07-10-2014 hi all I am new to scripting and i have written program which give sum of the digits in a number as follows: Code: Dim num,sum,getdigit sum= sum + cInt(getdigit) but I am not able to understand why I am getting this error because i am converting string to number. Can somebody help me with this? RE: Error in getting sum of numbers program - kotaramamohana - 07-15-2014 Hi, i have updated your for loop code, it is working now Code: Dim num,sum,getdigit RE: Error in getting sum of numbers program - QTpier - 07-18-2014 I understood the error... Error was coming only in the last iteration!! Thanks for the help. |