CONCAT - concatenate a series of strings.

Alternate Entry Name: .CONCA

Usage:

B:
   out = concat( out, in1, in2, in3, ... );
C:
   char *concat(char *out, const char *in1, ...);

Where:

in1, in2, in3, ...
are strings listed in the order in which they should be concatenated.
out
is the concatenated result.

Description:

CONCAT puts the concatenation of the ASCII strings given by its second through last arguments into the string "out". "out" may be the same as the first input parameter, as in

concat(a, a, b);

However, "out" may not match any of the other input parameters. Thus

concat(a, b, a);

will NOT work.

CONCAT always returns its first argument as its value.

CONCAT is the best method of copying a B string. For example,

auto a[10];
concat(a,"a string");

assigns to "a" the value "a string".

Notes:

The space allocated for the string "out" must be big enough to hold all the concatenated strings; otherwise, CONCAT could very well write over memory being used for other variables or executable code.

Copyright © 1996, Thinkage Ltd.