How Can we add two numbers in VB script without using Arithmatic operators - 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: UFT / QTP Interview Questions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Interview-Questions) +--- Thread: How Can we add two numbers in VB script without using Arithmatic operators (/Thread-How-Can-we-add-two-numbers-in-VB-script-without-using-Arithmatic-operators) |
How Can we add two numbers in VB script without using Arithmatic operators - kotaramamohana - 05-08-2012 Hi Friends, Can anyone tell, How can we add two numbers in VB script without using arithmatic operators a=10 b=5 RE: How Can we add two numbers in VB script without using Arithmatic operators - arescool - 06-13-2013 Hi, I wonder why no one has ever answered to this question :o Let me try : Code: Dim intNumber1 : intNumber1 = 10 I know this is a very crude solution, so i will be looking to improve on it myself and if anyone of you can suggest a better solution , please do that ... RE: How Can we add two numbers in VB script without using Arithmatic operators - pavansri - 06-15-2013 you are alsmost there arescool but your code would return 31, Which is not the answer expected here. how about this? Code: intNum1=10 RE: How Can we add two numbers in VB script without using Arithmatic operators - supputuri - 06-16-2013 try this below, simple way in QTP Code: DataTable.AddSheet("AddNumberwithoutArthOper").AddParameter "FirstNumber",iFirstNumber Let me know if you need further iNfo... If you feel this answer solved your query, please mark the status as "solved"and click on "Give Reputation for this user" buuton in my post. RE: How Can we add two numbers in VB script without using Arithmatic operators - kordirko - 06-23-2013 Using pure vbscript Code: a = 10 |