Jump to content

The Mystery of -=


Recommended Posts

I don't see a problem. Try this test

$i = 1
MsgBox(0, "results", "$i = " & $i)
$i += 1
MsgBox(0, "results", "$i = " & $i)
$i -= 1
MsgBox(0, "results", "$i = " & $i)

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

What do you get with this?

Global $ArrayMax -= $MultiList[0]-1
MsgBox(0, "Results", $ArrayMax)

Actually that line looks screwy. What were you expecting as a return? What is the size of the array?

EDIT: And what evilertoaster said

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Richard Robertson: THANKS! That made it work, and now that I look at it, the Global was unnecessary.

And to answer the questions of Evil Toaster and GEOSoft, that line was just an excerpt from a little algo that found duplicates or accidentally included files in a list of daily log files, the line where the syntax error was thrown.

-$ArrayMax was the Ubound value of the list array and the maximum for my For loop that compared each list item to the one below it after being sorted by the incredibly useful ArrayNatural UDF.

-$MultiList was the array of duplicates that was populated after a single duplicate was found and a While loop was run to find any further duplicates below.

Both values are dynamic, but both were declared beforehand and were guaranteed to be numbers.

Thanks for your help everyone!

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...