Is there a limitation on fat arrow, which would not allow a function like (val, cnt) => var%cnt% := val to modify var1 ... var9, which are byref variables in the enclosing scope?
I've been trying to debug code, and have had success assigning to an outer scope array with identical code, so I'm guessing it's a known limitation. Correct? (Sorry if I overlooked it in the documentation.)
[a100] fat arrow modifying dynamic var in outer scope Topic is solved
[a100] fat arrow modifying dynamic var in outer scope
Last edited by sirksel on 16 Nov 2018, 06:32, edited 1 time in total.
Re: [a100] fat arrow modifying byref var in outer scope Topic is solved
Byref or not doesn't matter.nested functions wrote:Dynamic variable references inside a nested function can resolve to variables from the outer function only if the nested function (or one of its own nested functions) also contains a non-dynamic reference to the variable.
Re: [a100] fat arrow modifying dynamic var in outer scope
That answers it perfectly, Helgef. I modified my thread title from "byref var" to "dynamic var" to make it more on-point with the real issue (dynamic, not byref) -- as you've helped me understand. Thanks.
Who is online
Users browsing this forum: alawsareps, Lefvo and 75 guests