Followers 0

Function Error

16 posts in this topic

#1 ·  Posted (edited)

Can some others confirm a 'Error in expression.' error in this example before I submit a bug report? If so this is ugly...

AutoIt version 3.3.1.3 beta

$val = DIE() + 1 ConsoleWrite($val & @CRLF)
; this one errors
$val = DIE() - 1 ConsoleWrite($val & @CRLF)

Func DIE()
Return 5
EndFunc
Edited by wraithdu

Share on other sites

#2 ·  Posted (edited)

Also:

$val = DIE() + 1 ConsoleWrite($val & @CRLF)
$val = DIE(10) + 1 ConsoleWrite($val & @CRLF)
$val = DIE(10) - 1 ConsoleWrite($val & @CRLF)
; this one errors
$val = DIE() - 1 ConsoleWrite($val & @CRLF)

Func DIE($val = 5) Return$val
EndFunc
Edited by wraithdu

Share on other sites

I can confirm it.

It happens only on the last call to DIE() and then only if it's a negative.

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!"

Share on other sites

Yep, that's correct. Crap. Once a few more people can confirm I'll post a bug. Oh, and my test was on Win7 RTM 32-bit.

Share on other sites

I get 6, 4, and 6, 11, 9, 4. Which is what I expected, should I get something else? What's returned for you?

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share on other sites

Also:

$val = DIE() + 1 ConsoleWrite($val & @CRLF)
$val = DIE(10) + 1 ConsoleWrite($val & @CRLF)
$val = DIE(10) - 1 ConsoleWrite($val & @CRLF)
; this one errors
$val = DIE() - 1 ConsoleWrite($val & @CRLF)

Func DIE($val = 5) Return$val
EndFunc
Same here on XP Pro SP3, works with Prod, fails on the last one only with Beta.

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share on other sites

@snowmaker

What AutoIt version are you using? I specified in the original post the error is with beta 3.3.1.3.

Share on other sites

Production 3.2.12.1, so it seems to be a 'Beta Bug' I guess

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share on other sites

#9 ·  Posted (edited)

It looks like somebody was playing in the lexer/parser again. Well fuck.

Can somebody run back through the betas and see if it's broken in all of them or if it just appeared in a specific version?

Edit: snowmaker... please don't bother commenting if you can't even use a version released in the last year.

Edited by Valik

Share on other sites

#10 ·  Posted (edited)

It looks like somebody was playing in the lexer/parser again. Well fuck.

Can somebody run back through the betas and see if it's broken in all of them or if it just appeared in a specific version?

Edit: snowmaker... please don't bother commenting if you can't even use a version released in the last year.

Works fine in 3.3.1.1 but broken in 3.3.1.2

Edited by P5ych0Gigabyte

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share on other sites

Same result here (XP x86 SP3): 3.3.1.1 works fine.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
RegExp tutorial: enough to get started
PCRE 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)

God damn it.

I just fix it.

For the time being you can add an unreferenced parameter $n=Die(0) -1 Sorry for the regression Share this post Link to post Share on other sites$val = DIE() + -1

is another workaround.

Share on other sites

Looks to be fixed in the new Beta 3.3.1.4 with XP Pro SP3:

>Running:(3.3.1.4):D:\Program Files\AutoIt3\beta\autoit3.exe "D:\Program Files\AutoIt3\Scripts\Test1.au3"
6
11
9
4
+>16:24:48 AutoIT3.exe ended.rc:0

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share on other sites

Yep, thanks for the quick fix!!