guides:programming:programmers_reference_manual:array2list_method_system

ARRAY2LIST method (System)

Utility method to convert data stored in an EDITTABLE ARRAY property structure (Column/Row) to an EDITTABLE LIST property structure (Row/Column).

List = Exec_Method( "SYSTEM",        
                    "ARRAY2LIST",  
                    Array,               
                    ColSize,            
                    RowSize,           
                    PrimaryDelim,    
                    SecondaryDelim )
NameRequiredDescription
ArrayYesData to convert. This should be in the same format as the data used with the EDITTABLE ARRAY property, i.e. columns are delimited by @fm, and rows delimited by @vm within each column.
ColSizeNoNumber of columns to convert. If not specified the system determines the number of columns itself. Defaults to 0.
RowSizeNoNumber of rows to convert. If not specified the system determines the number of rows itself. Defaults to 0.
PrimaryDelimNoDelimiter to use when parsing the Array for columns, and when delimiting rows in the returned List. Defaults to @fm.
SecondaryDelimNoDelimiter to use when parsing the Array for rows, and when delimiting columns in the returned List. Defaults to @vm.

Converted data structured as per the EDITTABLE LIST property, i.e. rows are delimited by the PrimaryDelim (@fm) and columns are delimited by SecondaryDelim (@vm) in each row.

ColSize and RowSize are optional. They do not limit the actual number of columns and rows processed by this method – they are simply used as a guideline to help with some internal memory optimization, which may help performance when processing very large arrays.

 
* // Get the contents of an EDITTABLE control in ARRAY format and convert

   * // it to the LIST format  (Yes, you could just get the LIST property

   * // but this is for demo purposes).

   

   ObjxArray =        @Window : ".EDT_MYDATA"

   PropArray =        "ARRAY"

   

   ObjxArray := @Rm : @Window : ".EDT_MYDATA"

   PropArray := @Rm : "LIMIT"

   

   DataArray        = Get_Property( ObjxArray, PropArray )

   

   EdtArray         = DataArray[1,@Rm]

   EdtDims          = DataArray[Col2()+1,@Rm]

   

   * // Convert the format

   EdtList = Exec_Method( "SYSTEM", "ARRAY2LIST", 

                          EdtArray,               

                          EdtDims<1>              

                          EdtDims<2> )
 
 
 

N/A

  • guides/programming/programmers_reference_manual/array2list_method_system.txt
  • Last modified: 2023/10/25 10:49
  • by 127.0.0.1