Concatenation operator in PowerBuilder
Description
The PowerBuilder concatenation operator joins the contents
of two variables of the same type to form a longer value. You can
concatenate strings and blobs.
The following table shows the concatenation operator.
|
Operator |
Meaning |
Example |
|---|---|---|
|
+ |
Concatenate |
|
Examples
Example 1
These examples concatenate several strings:
|
1 |
string Test |
|
1 |
Test = "over" + "stock" // Test contains "overstock" |
|
1 |
string Lname, Fname, FullName |
|
1 |
FullName = Lname + ', ' + Fname |
|
1 |
// FullName contains last name and first name, |
|
1 |
// separated by a comma and space. |
Example 2
This example shows how a blob can act as an accumulator when reading
data from a file:
|
1 |
integer i, fnum, loops |
|
1 |
blob tot_b, b |
|
1 |
. . . |
|
1 |
FOR i = 1 to loops |
|
1 |
bytes_read = FileRead(fnum, b) |
|
1 |
tot_b = tot_b + b |
|
1 |
NEXT |
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest