Difference between revisions of "String concatenation"

From Conservapedia
Jump to navigation Jump to search
(Rearranged for easier understanding, corrected spelling, clarified context.)
(encyclopedic arrangement, simplified, removed information irrelevant to string concatenation (type casting))
Line 1: Line 1:
In computer programming, a string is a series of characters.  The characters can be [[alphabet]]ic, numeric or special characters, or a combination thereof. '''String concatenation''', in very simple terms, is the joining of two strings. A numeric string must be converted to a numeric type before it can be used in calculations. Concatenation is language dependent and may have different operators depending on the computer programming language used.  
+
'''String concatenation''' is the joining of two series of characters, or strings.  The characters can be [[alphabet]]ic, numeric, special characters or a combination thereof. Concatenation is language dependent and may have different operators depending on the computer programming language used.  
  
 
  '''Example'''
 
  '''Example'''

Revision as of 23:45, February 12, 2009

String concatenation is the joining of two series of characters, or strings. The characters can be alphabetic, numeric, special characters or a combination thereof. Concatenation is language dependent and may have different operators depending on the computer programming language used.

Example

a = "this is"
b = "my name."
print ab
printed > this ismy name (note no space between is and my )
print a + b
printed> this is my name ( the + operator joins the strings with a space between them. )