BB___String_Concatenation

=String Concatenation= toc

Description
> String concatenation is joining strings together.

Syntax
> JB has two string concatenation operators: >> //stringExpression// + //stringExpression// > the result is a string expression, > and >> //anyExpression// ; //anyExpression// > anyExpression will be converted into a string and then the strings are concatenated, > the result is a string expression.

Hints
> Experiments show that operator has lowest possible priority, while (+) has priority above relational operators. So >> > first performs string concatenation, then comparison, and result is (numeric 0), while >> > first performs comparison, gets (numeric 0), then converts it to string and concatenates. Result in this case is string "01".

Example
code format="lb" varOne$ = "Hello" varTwo$ = "World" varThree$ = varOne$ + " " + varTwo$ print varThree$

varOne$ = "Hello" varTwo$ = "World" varThree$ = varOne$ ; " " ; varTwo$ print varThree$

varOne$ = "Apollo" varTwo = 17 varThree$ = varOne$ ; " " ; varTwo print varThree$

varOne = 19 varTwo = 72 varThree$ = varOne ; varTwo print varThree$ code

Useful Procedures
code format="lb" Place a useful function using this keyword here code