Xbasic

- (Concatenation with Trim Operator)

Syntax

Result as C = Operand1 as C - Operand2 as C

Arguments

Operand1Character

A character value.

Operand2

A character value or empty string ("").

Description

The Concatenation with Trim operator removes trailing spaces from Operand1 and then appends Operand2 to Operand1. In other words, this operator strips trailing blanks from the first field and then concatenates it with the second field to form a single new character string.

Example:

dim cc as C
cc = "word "
? cc - ""
= "word"
? cc - "abc"
= "wordabc"

dim firstname as c = "Beverly        "
dim lastname as c =  "Brine          "
? firstname - lastname
= "BeverlyBrine          "
? firstname - "" + " " + lastname - ""
= "Beverly Brine"

See also Character Addition Functions.

See Also