Administrators Jon Posted May 13, 2020 Administrators Share Posted May 13, 2020 AutoIt v3.3.15.2 Beta View File 3.3.15.2 (13th May, 2020) (Beta) AutoIt: - Fixed: Map elements being lost due to a deep-copy logic fail. Submitter Jon Submitted 05/13/2020 Category Beta iamtheky 1 Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Iczer Posted May 13, 2020 Share Posted May 13, 2020 It seems UDF-s has been reworked, especially _GUI* - control functions not use _WinAPI_InProcess() any more... Is there a no functionality loss in regard interaction with non-autoit GUI-s? Link to comment Share on other sites More sharing options...
jpm Posted May 14, 2020 Share Posted May 14, 2020 it is stil luse by an intrenal UDF no change in some case fixing Link to comment Share on other sites More sharing options...
wyf Posted May 15, 2020 Share Posted May 15, 2020 Added UDF _GUICtrlHeader_GetFilterText () did not enter the help document. Link to comment Share on other sites More sharing options...
mdanielm Posted June 27, 2020 Share Posted June 27, 2020 Hello, There is always the error: -1 ^ 2 = 1 In all algebraic systems the result is -1. Cordially. Link to comment Share on other sites More sharing options...
Nine Posted June 27, 2020 Share Posted June 27, 2020 "Where two operators have the same precedence the expression is evaluated left to right.". Tested with Excel (same approach) = same result, ie +1. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
mdanielm Posted June 28, 2020 Share Posted June 28, 2020 Yes, but who said that - and ^ have the same priority? For me, the operator ^ has higher priority than the unary operator -. With AutoIt: 3-1^2 = 4 !!!!!!!!!! Link to comment Share on other sites More sharing options...
mdanielm Posted June 28, 2020 Share Posted June 28, 2020 With Excel, the result is 2. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 28, 2020 Moderators Share Posted June 28, 2020 (edited) mdanielm, While appreciating that the results do not appear to be what you would expect - especially in your second example - I would argue that you make a good argument for the use of parentheses to explicitly force the operators to be used in the order you require. M23 P.S. And you do realise that the latest version is actually 3.3.15.3? Edited June 28, 2020 by Melba23 Musashi 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
BrewManNH Posted July 17, 2020 Share Posted July 17, 2020 On 6/27/2020 at 5:00 PM, mdanielm said: -1 ^ 2 = 1 In this example, you're evaluating -1 * -1, that's what the exponent is telling you to do. Two negative numbers multiplied together always yields a positive number. I'm not sure what the precedence is in algebra because I did terribly in it, but I do know that the exponent is just telling you how many times to multiply a number by itself. If you had used -1^3, the answer would be negative. Quote Negative numbers with exponents If the base is negative and the exponent is an even number, the final product will always be a positive number. If the base is negative and the exponent is an odd number, the final product will always be a negative number. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
jchd Posted July 17, 2020 Share Posted July 17, 2020 I agree with @mdanielm about the existence of a real bug, examplified with his expression 3-1^2. Look at the expression 1 - 1 ^ 2 which yields 2 under AutoIt. If you expect it to be evaluated as 1 - (1 ^ 2) the result should be 0 If you expect it to be evaluated as (1 - 1) ^ 2 the result should also be 0 The only possible nonsensical evaluation path that can give 2 is 1 + ((-1) ^ 2) but that means a ghost addition has magically appeared out of thin air inside the guts of the core. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
jpm Posted July 18, 2020 Share Posted July 18, 2020 On 6/28/2020 at 8:25 AM, mdanielm said: Yes, but who said that - and ^ have the same priority? For me, the operator ^ has higher priority than the unary operator -. With AutoIt: 3-1^2 = 4 !!!!!!!!!! in this case - is not unary but a substraction. The ^ operator as a same priority as - operator so the 4 is logical !!! different from Excel. Just use the () to avoid such behavior Link to comment Share on other sites More sharing options...
jchd Posted July 18, 2020 Share Posted July 18, 2020 Sorry @jpm wrong explanation! My previous post shows that the interpreter sees thing differently and does 3 + ((-1) ^ 2) just as it interprets 1-1^2 as 1 + ((-1) ^ 2) If the interpreter would interpret the red minus in 1-1^2 as a substraction, it would yield 0, not 2, whatever grouping or precedence it uses. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
argumentum Posted July 18, 2020 Share Posted July 18, 2020 ...interesting theme y'all have. I never got/understood clearly, all these arithmetic stuff, so I google. When I enter "(-1^2)" in google calculator, it reorganize it to "-(1^2)". link Same with "3-1^2" it reorganize it to "3-(1^2)". link "1-1^2" to "1-(1^2)" Did I clarify the subject with a irrefutable solution ?. Nope, nowhere near. We as peers, should look for peer reviewed info. to fall back to, in case of disagreement. That way the matter at hand can be based in a cited previous work and errors in opinion or the presentation of an idea, not get personal. ( I'm efficient that way ) Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Nine Posted July 18, 2020 Share Posted July 18, 2020 Help file is our friend and it clearly states that : Precedence When more than one operator is used in an expression the order in which things happen is controlled by operator precedence. The precedence used in AutoIt is given below. Where two operators have the same precedence the expression is evaluated left to right. From highest precedence to lowest: Not^ * / + - & < > <= >= = <> ==And Or Unary operators are not mentioned, so I thought it would be at the highest level. But with the above examples ppl gave, I tend to believe something is wrong with precedence of ^. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
jchd Posted July 18, 2020 Share Posted July 18, 2020 Indeed precedence of unary minus is not mentionned, but it should be. Anyway that still doesn't explain by which perverted magic the interpretor invents a wrong & ghost + sign in the middle of the operations in 1 - 1 ^ 2. If ^ precedence is higher than both unary minus and substraction, we get 1 - (1 ^ 2) which is 1 - 1 = 0 If ^ precedence is lower than both unary minus and substraction, we get (1 - 1) ^ 2 which is 0 ^ 2 = 0 The problem is that in this case the interpreter illogically considers the minus sign as a unary minus and then, to correct its mistake, invents a + sign to convert the now invalid syntax 1 (-1) ^2 into 1 + ((-1) ^ 2) = 1 + (1) = 2 This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
mdanielm Posted July 24, 2020 Share Posted July 24, 2020 (edited) Hello, I suggest, as a preprocessing of an algebraic expression, the replacement of the - unary by _ with an instruction like: $in = StringRegExpReplace ($in, "(^|(\*|\/|^|\())-", "$1_") Then just set the priority of _ less than ^ - greater or equal than * / and _2*3 will be calculated as (_2) * 3 or - less than * / and _2*3 will be calculated as _ (2 * 3) In both cases the priority of _ must remain greater than + - Edited July 24, 2020 by mdanielm Link to comment Share on other sites More sharing options...
jchd Posted July 24, 2020 Share Posted July 24, 2020 Operators' precedence and associativity must be formally defined and documented for all operators and strictly applied to any expression, not only algebraic. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
mdanielm Posted July 24, 2020 Share Posted July 24, 2020 I want to give _ _ 2 the meaning _ (_ 2) so: associativity = RIGHT 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