Insert data from one array into another

Started by 1bosborn, June 25, 2021, 12:56:24 PM

Previous topic - Next topic

1bosborn

I am working on a project where I want to see if data from one two dimensional array exists in a second array, and if so insert the entire row into a third array. It's been rolling around in my head as possibly some custom function using ArrayInsert on the target and a For/Next loop to get the values from the source array and assign the values to the inserted row in the target. I just thought I would ask if there is a built-in function I am missing before I tried to build something custom. Thanks as always for your wisdom.

td

There are several ways to approach your task but there is no one function that does it for you. So you will have to create something. Here is a link to a list of WIL array functions:

https://docs.winbatch.com/mergedProjects/WindowsInterfaceLanguage/html/ArrayHandling.htm

Staring at the list may help you imagine a clever solution.

One suggestion is to sort your rank 2 (two-dimensions) array(s). That will make searching quicker.

"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

You might also consider the Omnibus Extender and its SQLite capabilities.  Depending on what you are doing it you might find it an attractive alternative.

Jim

stanl

Quote from: JTaylor on June 25, 2021, 02:41:17 PM
You might also consider the Omnibus Extender and its SQLite capabilities.  Depending on what you are doing it you might find it an attractive alternative.

Jim


I agree with Jim's suggestion, especially if your arrays could be considered row,column assignments.


[EDIT] of course, this could turn out to be another 'homework'.....