Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
6Activity
0 of .
Results for:
No results containing your search query
P. 1
VB Script Operators

VB Script Operators

Ratings: (0)|Views: 104 |Likes:
Published by G.C.Reddy
VB Script Operators for Web developers and QTP Testers. It explains, Arithmetic, Comparison and Logical Operators with examples.
VB Script Operators for Web developers and QTP Testers. It explains, Arithmetic, Comparison and Logical Operators with examples.

More info:

Published by: G.C.Reddy on May 03, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

08/27/2010

pdf

text

original

 
gcreddy@gcreddy.com
Visit:
For VB Script and QTP Info
VB Script Operators
Operator precedence
a=10+20*2msgbox a '50a=(10+20)*2msgbox a '60
1) Arithmetic
a) ^ Exponentiationb) * multiplicationc) / divisiond) \ Integer divisione) Mod operatorf) + Additiong) - subtractionh) & concatenation
Example:
Dim a,b,ca=10b=3c=a^bmsgbox c '1000c=a*bmsgbox c '30
1
 
gcreddy@gcreddy.com
c=a/bmsgbox c '3.33333333c=a\bmsgbox c '3c=a mod bmsgbox c '1c=a-bmsgbox c '7Dim a,b,ca=10b=2c=3d=c*a^b'c=a+bmsgbox d '1000
Addition (+) operator
Dim a,b,ca=10b=2c=a+bmsgbox c '12 (if both are numeric, then it adds)a="10"b=2c=a+bmsgbox c '12 (one is string another numeric, then it adds)a="10"b="2"c=a+bmsgbox c '102 (if both are strings, then it concatenates)a="hydera"b="bad"c=a+bmsgbox c 'hyderabada="gagan"b=2c=a+bmsgbox c 'error
2
 
gcreddy@gcreddy.com
Concatenation Operator
Dim a,b,ca=10b=2c=a&bmsgbox c '102a="10"b=2c=a&bmsgbox c '102a="10"b="2"c=a&bmsgbox c '102a="hydera"b="bad"c=a&bmsgbox c '102
2) Comparison Operators (have equal precedence)
a) =b) <c) <=d) >e) >=f) <>
Example:
Dim a,b,ca=10b=2c=a=bmsgbox c 'falsec=a<bmsgbox c 'falsec=a>bmsgbox c 'true
3) Logical (have equal precedence)a) Not (Logical Negation)
3

Activity (6)

You've already reviewed this. Edit your review.
1 hundred reads
ramesh0171 liked this
omjsr liked this
minemotorola liked this
satishkumar360 liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->