Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
diff betwn "&" and "+" for cancatenation
#1
Solved: 11 Years, 4 Months ago
do these both character ("&" and "+" ) serve the same pupose of concatenation

i tried concatenation of 2 strings using both above chars it was workin fine then wat could be the differences
Reply
#2
Solved: 11 Years, 4 Months ago
Both can do the string concatenation, while + can also be used to add numeric values.
Just to eliminate confusion, try to use "&" when concatenating two strings.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Solved: 11 Years, 4 Months ago
thanks for the reply

to add a note :

In case of "+"
if both are numeric then it will add
if both are string then it will concatenate
if numeric +string then type mismatch

In case of "&"
if both are numeric then it will concatenate
if both are string then it will concatenate
if numeric +string then also concatenate
HERE ALL ARE Cases have concatenation
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  XML diff comparison bubblehead 0 5,700 05-21-2014, 12:01 PM
Last Post: bubblehead
  diff between invoke application and systemutil.run balatester 2 9,294 10-01-2010, 11:13 PM
Last Post: cdesserich
  Want to use a global variable in diff actions ashuniks 2 2,426 01-02-2009, 06:42 PM
Last Post: Ankur
  Diff. between page checkpoint link count and childobj count anemuday 0 2,245 07-20-2008, 10:11 PM
Last Post: anemuday

Forum Jump:


Users browsing this thread: 1 Guest(s)