BUILD$ function  

Purpose

Concatenate multiple strings with high efficiency

Syntax

x$ = BUILD$(a$,b$,c$,d$...)

Remarks

In some cases, string concatenation using the classic string operators can be a slow process.  This is particularly true when there are many operands using longer strings.  The BUILD$ function passes all the typical bottlenecks to create a new string at the greatest possible speed.  The following 2 lines are functionally identical, but the BUILD$ version will execute substantially faster.

x$ = a$ + "bb" + c$ + y$(7) + y$(i&) + z$

x$ = BUILD$(a$, "bb", c$, y$(7), y$(i&), z$)

In order to extract the utmost efficiency, BUILD$() was designed to work with a very narrow definition.  The component parameters must be dynamic string variables, either scalar or array, string literals, or string equates.  There is virtually no limit as to the number of parameters.

Generally speaking, the greater the number of parameters, the greater the increase in execution speed.

See also

LET, CHR$, CSET, CSET$, JOIN$, LSET, LSET$, REPEAT$, RSET, RSET$, STRING$, STRINSERT$