|
|
|
|
|
FileToArray (Function) In french: FichierVersTableau Fills an array of classes or structures with the content of an HFSQL data file or query. The values of members of instances of structures or classes are filled with the values of items of records found in the data file or in the query.
MesContacts is Class
NomDeFamille is string
Prénom is string
AdresseEmail is string
END
tabContact is array of MesContacts
HOpen(Contacts)
FileToArray(tabContact, Contacts)
Syntax
FileToArray(<Array> [, <Data file> [, <Search key>]])
<Array>: Array of structures or objects Name of one-dimensional array into which the elements found in the data file or in the query will be added. This array must be allocated in a structure or class type. <Data file>: Character string Name of the HFSQL data file or query used. <Search key>: Character string Name of search item used. This parameter is used when a filter is defined by HFilter. This parameter corresponds to the optimal search key to use, returned by HFilter.
Remarks - The array is entirely cleared by FileToArray.
- The automatic arrays are automatically resized according to the requirements.
- The data file is browsed according to the current filter on the data file.
- The position and the values of the current record are not modified by FileToArray.
- For each record found in the data file or in the query:
- for each member of structure or class with the same name, or same "mapping" attribute, as a file item, the item value is copied into the member value.
- if a structure or class member has no item with the same name in the data file, its value is not modified.
- if an item of data file has no member with the same name in the class, no copy of value will be performed.
- Warning: The FileToArray function is blocking for all threads.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|