IMPLODE
8.7B
The IMPLODE instruction assembles data from variables or objects into a single delimited destination variable.
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
dest
Required. A previously defined Character String Variable or FORM variable that is assembled.
sep
Required. A comma or one of the following prepositions: BY, TO, OF, FROM, USING, WITH, IN, or INTO.
delim
Required. A previously defined Character String Variable, Literal, decimal, octal, or hexadecimal value that defines a single delimiter value that separate individual fields in the {source} variable.
source
Required. A previously defined Character String Variable, Numeric Variable, a list of string and/or numeric variables, a VARLIST of string and/or numeric variables, or objects from which data is gathered.
result
Required. A previously defined Numeric Variable that receives the number of items that have been stored into the {dest} variable from the {source} list of variables.
Flags Affected: EOS
Note the following:
If the {delim} variable is a Null String, the instruction does not store a delimiter character in the {dest} string.
When {delim} is a Character String Variable or a Literal, the form pointer specifies the delimiter character that separate individual fields in the {dest} variable.
When {delim} is a decimal, octal, or hex value, the numeric value identifies the delimiter character that separates individual fields in the {source} variable. The value must be between zero to 255. A compiler error will occur if the value is not in this range.
If the {dest} variable is too small to receive all of {source} list data and delimiter characters, the EOS flag is set.
The IMPLODE instruction will store back to back delimiter characters in the {dest} variable when the corresponding {source} list variable does not contain any data.
If a {source} list variable is a GUI object, the GUI object must have been previously created. Otherwise, an O105 error will occur.
The {dest} and the first {source} variable may be the same.
The IMPLODE instruction will retrieve data from the GUI objects just as a GETITEM instruction. The data is retrieved as follows:
|
Object |
The data is retrieved the same as when GETITEM has a ... |
|
EDITTEXT EDITDATETIME RICHEDITTEXT LABELTEXT STATTEXT |
character string destination and the {item} number is zero. |
|
BUTTON EDITNUMBER CHECKBOX RADIO |
numeric variable as the destination and the {item} number is zero. |
|
COMBOBOX |
negative one (-1) item number. |
Both the PLBSERVE and PLBCLIENT must be a version 9.3A or later to allow use of a COMBOBOX.
See Also: Example Code, EXPLODE, PACK, PACKKEY, Character String Instructions
![]() |