ID : 5097
Join
Function
Return a string that contains the elements of the array, connected through a delimiter.
Syntax
Join (string list[, delimiter])
Guaranteed Entry
- String list
- Designate a list of strings in a one-dimensional variant array.
- Delimiter
- Designate a string which is used as a delimiter when creating strings by connecting array elements in string type data.Delimiter is optional. If it is omitted, a space (" ") is used as a delimiter.
Return Value
Return a string which is created by connecting array elements in string type data.
Description
- This command creates a string by connecting all the elements of one-dimensional array in order from front to back.A character specified by the delimiter is placed between elements.
- If a character which length is zero ("") is specified for the delimiter, a string will be the list which is combined without delimiter.
Attention
- An error occurs if a list of string is not variant type.
Example
'!TITLE "Pro1.pcs"
Sub Main
Dim aa( 2 ) As Variant
Dim bb As String
aa( 0 ) = "AB"
aa( 1 ) = "CD"
aa( 2 ) = "EF"
bb = Join ( aa, "," ) '"AB,CD,EF"
PrintDbg bb
End Sub
ID : 5097