Jump to content
BertKerkhof

Array-in-array routines for AutoIT

Recommended Posts

BertKerkhof

I always liked to work with Clipper. Whit that Dbase compiler it was easy to extend array's and juggle with rows and columns. It is pleasant that this is also feasible in AutoIT.

Many available functions operate on a single dimension array only. One of the advantages of the routines I published today, is that it is easy to retrieve and process a single array and restore it afterwards in multidimensional space. This reduces the need to double code for both one- and two dimensional situations.

With strings you never run into an out-of-bound error. Whether you try copying a negative number of bytes or retrieve bytes from above the length of the string, elegantly a zero byte string is returned. Make a start with this new set of functions to experience the same user-friendly plan with array's. Once you have the hang of it, you will see that the use of lists-in-lists is more versatile than square 2D arrays.

The module is named after a dutch chocolate maker. For the recursive visual effect, see:

           https://en.wikipedia.org/wiki/Droste_effect   

Build and comment on this basic starters set:

           https://github.com/BertKerkhof/aDrosteArray

 

DrosteCacao.jpg

Share this post


Link to post
Share on other sites
Jos

Nice!

This probably is difficult to translate for none Dutch speaking members :

; aStringFindAll :
  Local $S = "De kapper kapt knap maar de knecht van de knappe kapper kapt knapper dan de knappe kapper kappen kan"
  MsgBox(64, "Positions in string of 'kapper'", rRecite(aStringFindAll($S, "kapper"), ", "))

:)

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Earthshine
Posted (edited)

nice work. I would like that chocolate too.

edit, this is REALLY cool stuff. Thanks!

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites
czardas
Posted (edited)

Interesting example. I sometimes create lists of executable strings for various purposes - similar to this. It is possible to extend the 64 dimension limit using these techniques, but I can't imagine why anyone would do that. Good work. :)

Edited by czardas

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×