This section shows how to use some of the more complex character functions that are described in Character Functions in the JSL Syntax Reference.
In the Concat function, expressions yielding names are treated like character strings, but globals that have the name values are evaluated. The following example demonstrates that if you have a stored name value, you need to either use Char before storing it in a global, or Name Expr on the global name.
n = {abc};
c = n[1] || "def";
Show( c );
"abcdef"
m = Expr( mno );
c = m || "xyz";
Show( c );
Name Unresolved: mno in access or evaluation of 'mno' , mno/*###*/
m = Expr( mno );
c = Name Expr( m ) || "xyz";
Show( c );
"mnoxyz"
m = Char( Expr( mno ) );
c = m || "xyz";
Show( c );
"mnoxyz"
Concat Items() converts a list of string expressions into a single string, with each item separated by a delimiter. If unspecified, the delimiter is a blank. Its syntax is
resultString = Concat Items ({list of strings}, <“delimiter string”>);
a = {"ABC", "DEF", "HIJ"};
result = Concat Items(a, "/");
"ABC/DEF/HIJ"
result = Concat Items( a );
"ABC DEF HIJ"