CATS()

CATS()

Top  Previous  Next

 

The CATS() function concatenates corresponding elements of a dynamic array.

 

 

Format

 

CATS(string1, string2)

 

where

 

string1is the string to which string2 is to be concatenated.

 

string2is the concatenation string.

 

 

The CATS() function returns the result of concatenating corresponding dynamic array components (fields, values and subvalues) from the supplied strings.

 

The REUSE() function can be applied to either or both expressions. Without this function, any absent trailing values are taken as null strings.

 

 

Examples

 

S1 = "ABC":@fm:"DEF"

S2 = "123":@vm:"456":@fm:"789"

X = CATS(S1,S2)

 

Note that this example has both field and value marks. The above code fragment concatenates elements of the two strings yielding a result in X of "ABC123VM456FMDEF789"

 

 

S1 = "ABC":@fm:"DEF"

S2 = "123":@fm:"456":@fm:"789"

X = CATS(S1,S2)

 

This example concatenates elements of the two strings yielding a result in X of "ABC123FMDEF456FM789"

 

 

S1 = "ABC":@fm:"DEF"

S2 = "123":@fm:"456":@fm:"789"

X = CATS(REUSE(S1),S2)

 

Adding the REUSE() function to the previous example gives a result in X of "ABC123FMDEF456FMDEF789"