czardas Posted December 12, 2015 Share Posted December 12, 2015 (edited) Ah, that's where I got confused. Thanks for clearing up my confusion when I looked at that. LOL. I did mention the word convention somewhere earlier. Edited December 12, 2015 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
czardas Posted December 14, 2015 Share Posted December 14, 2015 (edited) I have been thinking about this for a couple of days now and I have to say that I am gratified to learn something new from JohnOne. Despite my efforts to rationalize the implementation in AutoIt (by means of what seemed to be the only reasonable explanation), it saddens me that things like this come up every once in a while. I would like to see AutoIt taken more seriously by the rest of the World. If only I had time to study, I would put in much more effort.Conventions can be misleading and should never be followed blindly. By the same token, they should never be contravened without good reason. I guess it's too late to change the way Ubound works in AutoIt: doing so would break just about every script that's ever been written (ouch). Edited December 14, 2015 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
Popular Post JohnOne Posted December 14, 2015 Author Popular Post Share Posted December 14, 2015 That's true, it would break many scripts, but there are script breaking changes all the time from release to release.The measure is, realising it and changing it, it's how a language must develop even with the most trivial of things.Phasing a change with backward compatibility is the way most things move forward.I am not a critic of AutoIt, I love it, It's brought me into coding, and I'd like to see it continue to evolve without veterans blindly defending it like it's a cult, because it's not, It's amazing and I really believe its (pardon the pun) boundaries have few limits.I truly believe that the more AutoIt is brought inline with mainstream, the more coders it will attract, and I'd hope that's what everyone wants.Thoughts going of topic, sorry.End. kcvinu, czardas, guinness and 2 others 5 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
czardas Posted December 14, 2015 Share Posted December 14, 2015 (edited) I truly believe that the more AutoIt is brought inline with mainstream, the more coders it will attract, and I'd hope that's what everyone wants.Thoughts going of topic, sorry.End.I'm with you all the way. Perhaps our little diversion could be split off to a new topic in Technical Discussion - from #249 onward. Edited December 14, 2015 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
JohnOne Posted December 14, 2015 Author Share Posted December 14, 2015 Yes, I forgot where we were talking.Good shout. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
iamtheky Posted December 14, 2015 Share Posted December 14, 2015 (edited) eh, this thread is a bag of dix anyway, I feel at home. thread snipping has once again defeated meta comments on the thread itself. Edited December 14, 2015 by iamtheky ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
JohnOne Posted December 14, 2015 Author Share Posted December 14, 2015 iamtheky 1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
trancexx Posted December 14, 2015 Share Posted December 14, 2015 I have been thinking about this for a couple of days now and I have to say that I am gratified to learn something new from JohnOne. Despite my efforts to rationalize the implementation in AutoIt (by means of what seemed to be the only reasonable explanation), it saddens me that things like this come up every once in a while. I would like to see AutoIt taken more seriously by the rest of the World. If only I had time to study, I would put in much more effort.Conventions can be misleading and should never be followed blindly. By the same token, they should never be contravened without good reason. I guess it's too late to change the way Ubound works in AutoIt: doing so would break just about every script that's ever been written (ouch).Think out of the box, and you'd soon see that changes like that can be made without breaking any scripts. All that's needed are two things - awareness of the box and alarm clock set to 14.12.2016. iamtheky 1 ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
czardas Posted December 14, 2015 Share Posted December 14, 2015 (edited) Hmm, changes to default behaviour are gonna break nearly everything, whatever size or shape the box is. I think element zero should be ditched and force LBound to be equal to 1. That would constitute progress IMO! All these mismatching counting systems are causing too many upsets. Damn those medieval Arabic scholars inventing zero! @JohnOne I used to play that piece very badly. Edited December 14, 2015 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
iamtheky Posted December 14, 2015 Share Posted December 14, 2015 (edited) Or If $array[0] always returned the correct ubound, and was not an element that could be set by the user? Might as well make things hard for the devs Edited December 14, 2015 by iamtheky ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
czardas Posted December 14, 2015 Share Posted December 14, 2015 I wonder about the history of this convention. I'm guessing it has to do with lack of memory back before when. I could be wrong - wouldn't surprise me! operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
trancexx Posted December 14, 2015 Share Posted December 14, 2015 Hmm, changes to default behaviour are gonna break nearly everything, whatever size or shape the box is. I think element zero should be ditched and force LBound to be equal to 1. That would constitute progress IMO! All these mismatching counting systems are causing too many upsets. Damn those medieval Arabic scholars inventing zero! @JohnOne I used to play that piece very badly. In active development if you want to change the behavior of some function then introduce new function with the exact same functionality. In your case maybe ...ArraySize(). After period of soaking (one release ahead) remove all the references to the old function from the documentation while keeping it part of the language undocumented. That would give users enough time to adopt to the new function. Active users would soon start to simply replace all occurrences of the old function with the new one because the documentation for the old function would be gone. Then release again. Then let it soak more and (1 year later?) remove the old function from the language completely and make new release.After that if you'd want you could add new function to the language - for example Ubound().Would that break "nearly everything"? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
czardas Posted December 14, 2015 Share Posted December 14, 2015 Yeah, that makes sense. Christmas day would be a good time for a new release - then we can remove all the wrapping. operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
trancexx Posted December 14, 2015 Share Posted December 14, 2015 Here's how professional would do it https://www.youtube.com/watch?v=APxGubAkOz0 iamtheky 1 ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
iamtheky Posted December 14, 2015 Share Posted December 14, 2015 Hah Indeed, disturbing the masses is the quickest way to get them to learn. Script Breaking changes should be revealed in the console after you hit F5 not in the documentation before hand. amirite? ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
czardas Posted December 14, 2015 Share Posted December 14, 2015 Ew that's gross. I remember now why I hated biology class in school. operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
JohnOne Posted December 14, 2015 Author Share Posted December 14, 2015 Can you freeze a frog in a similar fashion. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
iamtheky Posted December 14, 2015 Share Posted December 14, 2015 Can you freeze a frog in a similar fashion.I think you can only pretend to boil frogs, pretending to freeze them doesnt work ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
Bowmore Posted December 14, 2015 Share Posted December 14, 2015 I realise I'm coming to this discussion a bit late in the day. Think to the way languages such as C that don't have a For ... Next method of looping the return UBound() makes perfect sense to me. When used in the equivalent while loop.Local $a[100] Local $i = 0 while $i < UBound() $something= $a[$i] $i += 1 wendTo find the highest addressable element in an array I simply created a wrapper for UBound many years ago and put it in a UDF of useful little functions that I include in just about every script. For me MaxAIndex() is now part of the AoutoIt language.Func MaxAIndex($array) Return Ubound($array) - 1 EndFunc "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now