Posts: 24
Threads: 14
Joined: Nov 2009
Reputation:
0
12-16-2009, 01:52 PM
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
Posts: 1,105
Threads: 18
Joined: Jan 2008
Reputation:
8
12-16-2009, 05:02 PM
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.
Posts: 24
Threads: 14
Joined: Nov 2009
Reputation:
0
12-16-2009, 06:16 PM
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