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 |
“cat ” + “dog” |
Examples
Example 1
These examples concatenate several strings:
|
1 2 3 4 5 6 |
string Test Test = "over" + "stock" // Test contains "overstock" string Lname, Fname, FullName FullName = Lname + ', ' + Fname // FullName contains last name and first name, // 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 2 3 4 5 6 7 |
integer i, fnum, loops blob tot_b, b . . . FOR i = 1 to loops bytes_read = FileRead(fnum, b) tot_b = tot_b + b NEXT |
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest