Would be nice to declare variables as local to a flow, such that calling another flow won't wind up updating the parent's variable
Also, local to a block
{
local a;
a=5;
}
Just similar to standard C...
Explicitly declare variables local to a flow or block.
Moderator: Martin
Re: Explicitly declare variables local to a flow or block.
Martin ever thought about limiting and selecting which variable to be passed on the child's flow or returned back to parent's flow. Maybe that is better solution. But I don't know how is the progress.
For local block variable, seems unnecessary. I just reuse all the i, j, k from all the loop I used. The value get replace at every new block, so basically the same as having them the same as local block variable. But if you really need to clean up the variable (maybe your script depends on the null value of the variables), you can use removeVariable("a") or any variable name in quotes, before proceeding to the next block.
For local block variable, seems unnecessary. I just reuse all the i, j, k from all the loop I used. The value get replace at every new block, so basically the same as having them the same as local block variable. But if you really need to clean up the variable (maybe your script depends on the null value of the variables), you can use removeVariable("a") or any variable name in quotes, before proceeding to the next block.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.