Jump to content

ByRef $refArr = $aArray - Why it is not allowed?


Recommended Posts

Posted (edited)

I really need this kind of stuff
 

Local $a[10] = [1,2,3]

ByRef $test = $a

 

So when I change the value in $test, it will affect $a because it is a reference.

 

I know that I can do it in function.. but I need this kind of stuff.

My case is that I have array inside array so how I can work with that?

Writing something like

($array[$i][0])[0] = ...

Is ugly. If I could do

ByRef $aRefArr = $array[$i][0]

And then working on $aRefArr then it will be awesome.

 

Please consider implementing this.

 

Btw, thank you so much for making Autoit! I will give a donation because Autoit is making money for me thanks to a good product I am selling every day.
If I would be Microsoft I would consider to buy Autoit. It is the most powerful scripting & programing language for Windows.

 

Edited by Guest
Posted

So? Why it should be only in function?

My point is - why not allow it not only as a parameter?

In C++ it's called something like

int arr[2] = {1,2};
int& refArr = arr;

This is a great concept to add.

 

Can you add it?

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...