Botnet

Concatenation

What is this site? It is generaly simplier version of wikipedia. You will find there selected articles. Enjoy!

This article is about the string operation of computer programming. For other uses, see Concatenation (disambiguation).
This article may be confusing or unclear to readers. Please help clarify the article; suggestions may be found on the talk page. (July 2010)
For concatenation of general lists, see append.

In computer programming, string concatenation is the operation of joining two character strings end to end. For example, the strings "snow" and "ball" may be concatenated to give "snowball". In many programming languages, string concatenation is a binary infix operator.

For example, the following expression uses the "+" symbol as the concatenation operator:

print "Hello, " + "World";

Contents

Concatenation of sets of strings

In computer science, in particular in the theory of computation, the concatenation operation on strings is generalized to an operation on sets of strings as follows:

For two sets of strings S1 and S2, the concatenation S1S2 consists of all strings of the form vw where v is a string from S1 and w is a string from S2.

In this definition, the string vw is the ordinary concatenation of strings v and w as defined in the introductory section. In this context, sets of strings are often referred to as formal languages. Notice that we do not use an explicit operator symbol for representing the concatenation.

In audio/telephony

In programming for telephony, concatenation is used to provide dynamic audio feedback to a user. For example in a "time of day" speaking clock, concatenation is used to give the correct time by playing the appropriate recordings concatenated together. For example:

The recordings themselves exist separately, but playing them one after the other provides a grammatically correct sentence to the caller.

This technique is also used in number change announcements, voice mail systems, or most any telephony application that provides dynamic feedback to the caller (e.g. moviefone, tellme, and others).

Programming for any kind of computerized public address system can also employ concatenation for dynamic public announcements (for example, flights in an airport). The system would archive recorded speech of numbers, routes or airlines, destinations, times, etc. and play them back in a specific sequence to produce a grammatically correct sentence that is announced throughout the facility.

In databases

One of the principles of relational database design is that the fields of data tables should reflect a single characteristic of the table's subject, which means that they should not contain concatenated strings. When concatenation is desired in a report, it should be provided at the time of running the report. For example, when you want to know the physical address of a certain customer, you want to know building number, street name, building subunit number, city name, state/province name, postal code, and country name, e.g., 123 Fake St Apt 4, Boulder, CO 80302, USA, which comprises 7 fields. However, your CUSTOMERS data table should not use one field to store that concatenated string; rather, the concatenation of the 7 fields should happen upon running the report. The reason for such principles is that without them, the entry and updating of large volumes of data becomes error-prone and labor-intensive.

References

External links

Retrieved from "http://en.wikipedia.org/wiki/Concatenation"

All text are available under the terms of the GNU Free Documentation License. Hope this site help you/
pozycjonowanie - farby do malowania ścian - transport polska - zegarki damskie - nity - projektowanie ogrodów - aranżacja wnętrz szczecin - herbata sklep - biuro rachunkowe warszawa - strony www - projektowanie ogrodów - Prezenty - maine coon - fotografia katalogowa - audyty energetyczne chirurgia plastyczna odzież ochronna opony zimowe Fracht Ustalanie ojcostwa