PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
ArrayToString (Function)
In French: TableauVersChaîne
Converts a one-dimensional array or a two-dimensional array into a character string.
Note: This function can only be used on the WLanguage arrays.
Versions 15 and later
WINDEVJava This function is now available for the Java applications.
Android This function is now available for the Android applications.
New in version 15
WINDEVJava This function is now available for the Java applications.
Android This function is now available for the Android applications.
WINDEVJava This function is now available for the Java applications.
Android This function is now available for the Android applications.
Versions 16 and later
Universal Windows 10 App This function is now available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This function is now available for the Windows Phone applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
WEBDEV - Browser code This function is now available in browser code.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
WEBDEV - Browser code This function is now available in browser code.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
WEBDEV - Browser code This function is now available in browser code.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// One-dimensional array
sMyValues is string
// Initial array
MyArray is array of 3 strings
MyArray[1] = "A"
MyArray[2] = "B"
MyArray[3] = "C"
sMyValues = ArrayToString(MyArray)
// sMyValues contains: "A" + CR + "B" + CR + "C"
// Two-dimensional array
sMyValues is string
// Initial array
MyArray is array of 2 by 3 strings
MyArray[1,1] = "A"; MyArray[1,2] = "B"
MyArray[1,3] = "C"; MyArray[2,1] = "D"
MyArray[2,2] = "E"; MyArray[2,3] = "F"

sMyValues = ArrayToString(MyArray)
// sMyValues contains: "A" + TAB + "B" + TAB + "C" +CR+ "D" + TAB + "E" + TAB + "F"
Syntax

Converting a one-dimensional array Hide the details

<Result> = ArrayToString(<Array Name> [, <Element Separator>])
<Result>: Character string
Character string containing the different values found in the array. The array elements are converted into character strings and added to the string while being separated by the <Element Separator>.
<Array Name>: Array variable
Name of the one-dimensional array that must be converted into a character string. This array must be allocated
<Element Separator>: Optional character string (with quotes)
Separator used to separate the values of the different array elements. The element separator used by default is the CR character (Carriage Return).

Converting a two-dimensional array Hide the details

<Result> = ArrayToString(<Array Name> [, <Row Separator> [, <Column Separator>]])
<Result>: Character string
Character string containing the different values found in the array. The array elements are converted into character strings and added to the string. The rows are separated by <Row Separator> and the columns are separated by <Column Separator>.
<Array Name>: Array variable
Name of the two-dimensional array that must be converted into a character string. This array must be allocated
<Row Separator>: Optional character string (with quotes)
Separator used to separate the values of the different rows. The row separator used by default is the CR character (Carriage Return).
<Column Separator>: Optional character string (with quotes)
Separator used to separate the values of the different columns. The column separator used by default is TAB.
Remarks
  • The structure arrays supported are the one-dimensional arrays only. In this case, the order of parameters defines the order in the result string.
  • The arrays containing UNICODE strings or variants are not supported.
  • For the Duration type, the value is converted into thousands of a second.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Windows Mobile wp230vm.dll
WEBDEV - Browser code WDJS.DLL
Java wd230java.jar
Linux wd230vm.so
Android wd230android.jar
Minimum required version
  • Version 12
This page is also available for…
Comments
Exemplo ArrayToString
// Exemplo ArrayToString

tabListanumeros is array of 0 int
ArrayAddLine(tabListanumeros,10)
ArrayAddLine(tabListanumeros,5)
//Coloca Array numa String

EDT_Texto = ArrayToString(tabListanumeros)

//Blog com Video e Exemplo

http://windevdesenvolvimento.blogspot.com.br/2016/12/aula-992-windev-array-004-arraytostring.html

https://www.youtube.com/watch?v=bno74xpyl5w
De matos
Dec. 10 2016