Dynamically Change Input Variable - Can We...?
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: Dynamically Change Input Variable - Can We...?
exists() verification can take time, so I prefer they are all treated as files, ie, wiped away right from start.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
PeterH
- Posts: 2827
- Joined: 21 Nov 2005 20:39
- Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%
Re: Dynamically Change Input Variable - Can We...?
Hm - what to say?SkyFrontier wrote:Hi, Peter.
In case I'm trying to improve the general speed of script execution. The loop is used because I need to check a huge list of input ($a), reducing it to a minimum common value, thus allowing the magic.
The actual case is described here: http://www.xyplorer.com/xyfc/viewtopic. ... 60#p125367 , and this is an idea I had to solve it.
Feel free to contribute there, too, if you'd like to.
(now I'll finally study the suggested methods)
(Sorry: restricted time to think about the original case...)
But you said: "I need to check a huge list of input ($a), reducing it to a minimum common value"
So
- either directly loop on $a with e.g. ForEach - but don't change $a, but a copy $a2
- or do what I think others said: manually loop by While, until "all is done" - here you can change $a *if* you re-calculate all needed index variables *to* $a. Or also create $a2.
In both cases $a2
- either can be a copy of $a, where the changes are applied to, or
- be started empty, and dynamically be expanded while examining $a
It seems I'd loop by ForEach (i.e. entry by entry), dynamically creating and expanding $a2
And sorry to say: years ago I said "I will never learn regular expressions". I think it's good this way
(It doesn't seem to work the way I am thinking
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: Dynamically Change Input Variable - Can We...?
Thanks for the input, Peter.
In fact the closest I got for a solution was the old while loop trick, but then I stuck at the regex thing. Yeah, I know the feeling (probably not for the same reason as you): two times I researched on regex but soon I quit learning it due to time constraints, plus for seeing it... regex. >sigh<
Once I asked here for an XY approach to automation for regex construction, now I have at least one reason to believe that would not be possible: even regexMagic, an apparently easy solution for regex building, is complicated to use (I just needed a demo video to realize I would have to take a quite steep learning curve for just learning how to operate it).
highend (once again!) was very helpful in finding a solution with me - a first test with a ~3k items list was processed in no time. Perfection! Thank you, highend!
In fact the closest I got for a solution was the old while loop trick, but then I stuck at the regex thing. Yeah, I know the feeling (probably not for the same reason as you): two times I researched on regex but soon I quit learning it due to time constraints, plus for seeing it... regex. >sigh<
Once I asked here for an XY approach to automation for regex construction, now I have at least one reason to believe that would not be possible: even regexMagic, an apparently easy solution for regex building, is complicated to use (I just needed a demo video to realize I would have to take a quite steep learning curve for just learning how to operate it).
highend (once again!) was very helpful in finding a solution with me - a first test with a ~3k items list was processed in no time. Perfection! Thank you, highend!
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
XYplorer Beta Club