A string is most often text, for example "HelloWorld". To stick two or more string variables together, use the + operator.
txt1= "What a very"
txt2= "nice day!"
txt3=txt1+txt2
The variable txt3 now contains "What a verynice day!"
To add a space between two string variables, insert a space into the expression, OR in one of the strings.
txt1= "What a very"
txt2= "nice day!"
txt3=txt1+" " +txt2
or
txt1= "What a very"
txt2= "nice day!"
txt3=txt1+txt2
The variable txt3 now contains "What a very nice day!"
April 20, 2009
0 String Operator
Posted by raj on 7:44 AM
0 comments:
Post a Comment