PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Inserting a row
  • Inserting a row into an advanced array property
  • Various
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
Inserts a row at a given position:
  • into a two-dimensional WLanguage array.
  • into an advanced two-dimensional array property (xlsDocument, ...).
Note: This function is identical to InsertLine.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
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.
Versions 22 and later
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
WINDEVJava This function is now available for the Java applications.
New in version 22
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
WINDEVJava This function is now available for the Java applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
WINDEVJava This function is now available for the Java applications.
Example
MyArray is array of 2 by 3 strings
ArrayInsertLine(MyArray, 1, "A", "B", "C")
ArrayInsertLine(MyArray, 2, "a", "b", "c")
ArrayInsertLine(MyArray, 3, "D", "E", "F")
// Display the content of the 3rd row
Trace(MyArray[3,1], MyArray[3,2], MyArray[3,3])
// Displays "D E F"
Syntax
ArrayInsertLine(<Array Name> , <Insertion Subscript> [, <Element Column 1> [... [, <Element Column N>]]])
<Array Name>: Array
Name of Array variable to use. This array must be a two-dimensional array.
<Insertion Subscript>: Integer
Subscript where the row must be inserted. From this subscript, all the rows will be moved by 1 row.
If <Insertion Subscript> is equal to the number of array rows + 1, the row is added at the end of the array (equivalent to ArrayAddLine).
A WLanguage error occurs if <Insertion Subscript> is greater than the number of array rows + 1.
<Element Column 1>: Type of array elements, optional
Element of the row that will be added into the specified array. Each element corresponds to a column in the array. The type of the added element must be compatible with the type of the relevant column.
If none of these parameters is specified, an empty row is added to the array. The columns are initialized with the default value of the type of the other array elements.
If one of these parameters is not specified, the corresponding column is initialized with the default value of the type of the other array elements.
<Element Column N>: Type of array elements, optional
Element of the row that will be added into the specified array. Each element corresponds to a column in the array. The type of the added element must be compatible with the type of the relevant column.
If none of these parameters is specified, an empty row is added to the array. The columns are initialized with the default value of the type of the other array elements.
If one of these parameters is not specified, the corresponding column is initialized with the default value of the type of the other array elements.
Remarks

Inserting a row

When using ArrayInsertLine:
  • the array is automatically enlarged to receive the new row.
  • the elements are converted (if necessary) into the type of the other array elements.
Note: When declaring an array of N by M elements, this array contains N empty rows. For example, the array declared below contains 3 empty rows.
MyArray is array of 3 by 2 strings
When inserting a row (ArrayInsertLine), this row is automatically inserted among the rows already found in the array.
In our example, the array will contain 4 rows once the insertion is performed.

Inserting a row into an advanced array property

When using ArrayInsertLine:
  • the advanced variable must be allocated.
  • the advanced type must have an enumerator of modifiable collection type.
  • the advanced type is automatically enlarged to receive the new row.

Various

  • This function cannot be used on:
    • the non-allocated arrays,
    • the fixed arrays.
  • To add a row at the end of a two-dimensional array, use ArrayAddLine or AddLine.
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 10
This page is also available for…
Comments
Click [Add] to post a comment